/*
Theme Name: ZapatillasDrop
Author: Armando Valera
Version: 1.0.0
*/

:root {
    --primary-color: #333;
    --accent-color: #ff9900;
    /* Amazon styles */
    --text-color: #333;
    --light-gray: #f4f4f4;
    --border-color: #ddd;
    --container-width: 1200px;
    --sidebar-width: 250px;
}

/* Global Reset & Typography */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-color);
    background: #fff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Containers */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.site-header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1.5rem;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.85rem;
    color: #888;
    margin: 1rem auto;
    padding: 0 1rem;
    max-width: var(--container-width);
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Catalog Layout */
.catalog-grid {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    align-items: start;
    /* Prevent sidebar stretching */
}

/* Sidebar */
.filters-sidebar {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #eee;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #555;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.25rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.filter-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

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

/* Product Card */
.product-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    background: #fff;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.product-card .card-img {
    height: 200px;
    object-fit: contain;
    /* Don't crop zapatillas */
    width: 100%;
    padding: 1rem;
    /* Whitespace around image */
}

.product-card img.card-img {
    background: white;
}

.product-card .card-body {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card .card-title {
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    flex-grow: 1;
}

.product-card .card-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: #B12704;
    /* Amazon price color */
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    border: none;
    font-size: 0.95rem;
}

.btn-primary {
    background: #FFD814;
    /* Amazon button yellow */
    color: #111;
    border: 1px solid #FCD200;
}

.btn-primary:hover {
    background: #F7CA00;
}

.btn-amazon {
    width: 100%;
}

/* Pagination & Loader */
.pagination {
    margin-top: 2rem;
    text-align: center;
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.loader {
    display: none;
    text-align: center;
    padding: 2rem;
    color: #888;
}


/* Single Product */
.single-product-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 3rem;
    margin-bottom: 3rem;
}

.single-info h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.product-status {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.pros-cons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.pros {
    background: #f0fff4;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #c6f6d5;
}

.cons {
    background: #fff5f5;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #fed7d7;
}

.pros h3,
.cons h3 {
    margin-top: 0;
    font-size: 1.1rem;
}

.pros ul,
.cons ul {
    padding-left: 1.2rem;
    margin-bottom: 0;
}

/* FAQ Section */
.faq-section {
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

/* Footer */
.site-footer {
    background: #333;
    color: #fff;
    padding: 3rem 0;
    margin-top: 4rem;
}

.site-footer a {
    color: #ccc;
}

.site-footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.copyright {
    text-align: center;
    border-top: 1px solid #444;
    padding-top: 1rem;
    font-size: 0.9rem;
    color: #888;
}

/* Helper Classes */
.mobile-only {
    display: none !important;
}

/* 
   -----------------------------------------
   RESPONSIVE
   -----------------------------------------
*/

/* Tablet / Small Desktop (max 992px) */
@media (max-width: 992px) {
    .container {
        max-width: 100%;
    }

    /* Show Mobile Filter Button */
    .mobile-only {
        display: block !important;
    }

    /* Catalog Layout Change */
    .catalog-grid {
        display: block;
        /* Stack */
    }

    /* Filter Toggle Button */
    #mobile-filter-toggle {
        width: 100%;
        margin-bottom: 1rem;
        background: #eee;
        border: 1px solid #ddd;
        padding: 10px;
    }

    /* Hide Sidebar by default on mobile */
    .filters-sidebar {
        display: none;
        /* JS will toggle this */
        background: white;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1000;
        overflow-y: auto;
        padding: 2rem;
    }

    .filters-sidebar.active {
        display: block;
    }

    .sidebar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;
        border-bottom: 1px solid #eee;
        padding-bottom: 1rem;
    }

    .close-btn {
        background: none;
        border: none;
        font-size: 2rem;
        cursor: pointer;
    }

    /* Single Product changes */
    .single-product-layout {
        display: block;
    }

    .single-gallery {
        margin-bottom: 1.5rem;
        text-align: center;
    }
}

/* Mobile (max 600px) */
@media (max-width: 600px) {

    /* Header */
    .site-header {
        position: relative;
    }

    /* Unstick header to save space or keep preference */
    .site-header .inner {
        flex-direction: column;
        gap: 10px;
    }

    .site-header nav ul {
        gap: 1rem;
        font-size: 0.9rem;
    }

    /* Product Grid */
    .product-grid {
        grid-template-columns: 1fr;
        /* 1 Column */
    }

    .product-card {
        flex-direction: row;
        /* Horizontal style for mobile lists ? Or big cards? Let's stick to Big Vertical Cards */
        flex-direction: column;
    }

    .product-card .card-img {
        height: 220px;
    }

    /* Typography */
    .single-info h1 {
        font-size: 1.5rem;
    }

    /* Pros/Cons Stack */
    .pros-cons-grid {
        grid-template-columns: 1fr;
    }

    /* Buttons */
    .btn {
        width: 100%;
        padding: 12px;
        font-size: 1rem;
    }

    /* Hit targets */

    /* Inputs */
    input[type="text"],
    input[type="number"],
    select {
        padding: 10px;
        font-size: 16px;
        /* Stop iOS zoom */
    }

    /* Sticky CTA */
    .mobile-sticky-cta {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: white;
        padding: 10px 15px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        z-index: 999;
        display: flex;
        align-items: center;
        gap: 10px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom));
    }

    .sticky-info {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .sticky-title {
        font-size: 0.8rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
    }

    .sticky-price {
        font-weight: bold;
        color: #B12704;
        font-size: 1rem;
    }

    .btn-amazon-sticky {
        background: #FFD814;
        color: #111;
        padding: 10px 20px;
        border-radius: 4px;
        font-weight: 500;
        border: 1px solid #FCD200;
    }

    /* Add padding to body so content isn't hidden by sticky CTA */
    body.single-zd_product {
        padding-bottom: 80px;
    }
}

/* Hide sticky CTA on Desktop/Tablet */
@media (min-width: 601px) {
    .mobile-sticky-cta {
        display: none;
    }
}

/* 
   -----------------------------------------
   SINGLE PRODUCT UPDATES
   -----------------------------------------
*/
.below-image-summary {
    margin-top: 16px;
}

.below-image-summary h3 {
    margin: 16px 0 8px;
    font-size: 1.1rem;
}

.below-image-summary p {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: #555;
}

.below-image-summary ul {
    margin: 0;
    padding-left: 18px;
}

.below-image-summary li {
    margin: 6px 0;
    font-size: 0.9rem;
}

.product-long-description {
    max-width: 900px;
    margin: 40px auto 3rem;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.product-long-description h2 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 1rem;
}

@media (max-width: 600px) {
    .product-long-description {
        padding: 15px;
        margin-top: 20px;
    }
}