/**
 * Tonevo - Custom CSS
 * Supplements style.css with additional enhancements
 *
 * @package Tonevo
 */

/* =====================================================
   HEADER
   ===================================================== */
#site-header {
    position: sticky;
    top: 0;
    z-index: 50;
}

/* Search input icon alignment fix */
#site-header .relative input[type="text"] {
    padding-left: 2.5rem;
}
#site-header .relative .fa-search {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* =====================================================
   HERO SECTION
   ===================================================== */
.hero-section {
    min-height: 500px;
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 350px;
        background-position: center center;
    }
    .hero-section h1 {
        font-size: 2rem !important;
    }
    .hero-section p {
        font-size: 1rem !important;
    }
}

/* =====================================================
   PRODUCT GRID - RESPONSIVE TWEAKS
   ===================================================== */
.product-card .h-64 {
    height: 16rem;
    overflow: hidden;
}
.product-card img.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

/* =====================================================
   FILTER CHECKBOXES
   ===================================================== */
.filter-checkbox:checked + label {
    background-color: #1a1a1a !important;
    color: white !important;
    border-color: #1a1a1a !important;
}
label[for^="filter-"] {
    transition: background-color 0.2s ease, color 0.2s ease;
}
label[for^="filter-"]:hover {
    background-color: #f5f5f5;
}

/* =====================================================
   PRICE RANGE SLIDER
   ===================================================== */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: #d1d5db;
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1a1a1a;
    cursor: pointer;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #1a1a1a;
    cursor: pointer;
    border: 2px solid white;
}

/* =====================================================
   CART TABLE
   ===================================================== */
.cart-table th,
.cart-table td {
    padding: 1rem 0.5rem;
}
@media (max-width: 640px) {
    .cart-table thead {
        display: none;
    }
    .cart-table tr {
        display: block;
        border-bottom: 1px solid #e5e7eb;
        padding: 0.75rem 0;
    }
    .cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.25rem 0;
        border: none;
    }
    .cart-table td::before {
        content: attr(data-label);
        font-weight: 600;
        margin-right: 1rem;
    }
}

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination-nav a {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    background: white;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}
.pagination-nav a:hover {
    background: #f3f4f6;
}
.pagination-nav a.current {
    background: #1f2937;
    color: white;
    border-color: #1f2937;
}
.pagination-nav a:first-child { border-radius: 6px 0 0 6px; }
.pagination-nav a:last-child  { border-radius: 0 6px 6px 0; }

/* =====================================================
   FOOTER
   ===================================================== */
footer a:hover {
    text-decoration: underline;
}

/* =====================================================
   ACCESSIBILITY
   ===================================================== */
:focus-visible {
    outline: 2px solid #c0c0c0;
    outline-offset: 2px;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 2px solid #1a1a1a;
    outline-offset: 2px;
}

/* =====================================================
   PAGE TRANSITION
   ===================================================== */
.tab-content {
    animation: none;
}
.tab-content.active {
    animation: fadeInPage 0.25s ease-out;
}
@keyframes fadeInPage {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   WP ADMIN BAR FIX
   ===================================================== */
.admin-bar #site-header {
    top: 32px;
}
@media screen and (max-width: 782px) {
    .admin-bar #site-header {
        top: 46px;
    }
}

/* =====================================================
   UTILITY
   ===================================================== */
.container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

/* Skeleton loader for images */
.img-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton 1.4s infinite;
}
@keyframes skeleton {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
