/*
Theme Name: Patike
Description: A custom WordPress theme for Patike with Tailwind CSS
Version: 1.0.0
Author: Your Name
*/

/* 
  Tailwind CSS is loaded via CDN in functions.php
  This file is kept minimal for WordPress theme requirements
*/

/* WordPress required styles */
.screen-reader-text {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignleft {
  float: left;
  margin-right: 1rem;
}

.alignright {
  float: right;
  margin-left: 1rem;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

.sticky {
  position: relative;
}

.gallery-caption {
  font-size: 0.875rem;
  color: #6b7280;
}

.bypostauthor {
  position: relative;
}

/* Main font family */
body {
  font-family: 'Poppins', sans-serif;
}

/* Custom styles for the Patike theme */

/* Cart icon - remove any background styling */
.cart a,
.cart a:hover,
.cart a:focus,
.cart a:active {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.cart svg {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* Filter system styles */
.filter-toggle svg {
    transition: transform 0.3s ease;
}

.filter-toggle svg.rotate-180 {
    transform: rotate(180deg);
}

.filter-content {
    transition: all 0.3s ease;
}

.filter-content.hidden {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

.filter-content:not(.hidden) {
    max-height: 500px;
    opacity: 1;
}

/* Size filter buttons */
.size-filter:checked + span,
.general-size-filter:checked + span {
    background-color: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
}

/* Mobile filter improvements */
@media (max-width: 1024px) {
    .filter-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        width: 300px;
        background: white;
        z-index: 50;
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }
    
    .filter-sidebar.open {
        left: 0;
    }
    
    .filter-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 40;
        display: none;
        transition: opacity 0.3s ease;
    }
    
    .filter-overlay.open {
        display: block;
        opacity: 1;
    }
}

/* Mobile filter close button */
.filter-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f3f4f6;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.filter-close:hover {
    background-color: #ef4444;
    color: white;
    transform: scale(1.1);
}

.filter-close:active {
    transform: scale(0.95);
}

/* Loading states */
.filter-loading {
    z-index: 9999;
}

/* Pagination styles - WordPress default structure */
.page-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.page-numbers li {
    list-style: none;
}

.page-numbers a,
.page-numbers span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f3f4f6;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
}

.page-numbers a:hover {
    background-color: #e5e7eb;
    color: #374151;
}

.page-numbers .current {
    background-color: #ef4444;
    color: white;
}

.page-numbers .current:hover {
    background-color: #dc2626;
}

.page-numbers .dots {
    background: transparent;
    color: #6b7280;
}

.page-numbers .prev,
.page-numbers .next {
    font-size: 16px;
}

/* Product grid improvements */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

@media (max-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
}

/* Mobile filter toggle button */
.mobile-filter-toggle {
    display: none;
}

@media (max-width: 1024px) {
    .mobile-filter-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        background: #ef4444;
        color: white;
        padding: 0.75rem 1.5rem;
        border-radius: 0.5rem;
        border: none;
        font-weight: 500;
        cursor: pointer;
        transition: background-color 0.3s ease;
        margin-bottom: 1rem;
        position: relative;
    }
    
    .mobile-filter-toggle:hover {
        background: #dc2626;
    }
    
    .mobile-filter-toggle:active {
        transform: scale(0.98);
    }
}

/* Filter sidebar animations */
@media (max-width: 1024px) {
    .filter-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .filter-sidebar.open {
        transform: translateX(0);
    }
}

/* Size popup improvements */
.size-popup {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #d1d5db;
    background: white;
    z-index: 9999 !important;
}

/* Ensure product cards don't clip popups */
.product-grid > div {
    position: relative;
    z-index: 1;
}

.product-grid > div:hover {
    z-index: 10;
}

/* Size more button improvements */
.size-more-btn {
    position: relative;
}

.size-more-btn:hover + .size-popup,
.size-popup:hover {
    display: block !important;
}