/* ==========================================================================
   Sigue el Carnaval - Tienda de Disfraces
   Theme: Festive Carnival (Bordeaux + Gold)
   ========================================================================== */

/* CSS Variables */
:root {
    --primary: #8B1538;
    --primary-dark: #6B0F2A;
    --primary-light: #A82050;
    --accent: #D4AF37;
    --accent-light: #E8C84A;
    --background: #FEFEFE;
    --background-alt: #F8F5F0;
    --text: #2D2D2D;
    --text-light: #5A5A5A;
    --text-muted: #888888;
    --border: #E5E0D8;
    --success: #28A745;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.25s ease;
    --max-width: 1280px;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

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

/* ==========================================================================
   Header
   ========================================================================== */

.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 0;
    font-size: 0.85rem;
}

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

.header-top a {
    color: var(--white);
}

.header-top a:hover {
    color: var(--accent);
}

.header-main {
    padding: 1rem 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo span {
    color: var(--accent);
}

/* Navigation */
.nav-main {
    display: flex;
    gap: 0.5rem;
}

.nav-main a {
    padding: 0.6rem 1rem;
    color: var(--text);
    font-weight: 500;
    border-radius: var(--radius-sm);
}

.nav-main a:hover {
    background: var(--background-alt);
    color: var(--primary);
}

/* Search */
.search-box {
    display: flex;
    max-width: 320px;
    flex: 1;
}

.search-box input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: 2px solid var(--border);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-family: inherit;
    font-size: 0.9rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-box button {
    padding: 0.7rem 1.2rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--primary-dark);
}

/* ==========================================================================
   Trust Bar
   ========================================================================== */

.trust-bar {
    background: var(--background-alt);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.trust-items {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.trust-item svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero .btn {
    background: var(--accent);
    color: var(--primary-dark);
}

.hero .btn:hover {
    background: var(--accent-light);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.8rem;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.btn-accent {
    background: var(--accent);
    color: var(--primary-dark);
}

.btn-accent:hover {
    background: var(--accent-light);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-lg {
    padding: 1.1rem 2.2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
}

/* ==========================================================================
   Product Cards
   ========================================================================== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
    padding: 2rem 0;
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.product-card-image {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--background-alt);
}

.product-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.product-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--accent);
    color: var(--primary-dark);
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.product-card-content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
    line-height: 1.4;
}

.product-card-title a {
    color: inherit;
}

.product-card-title a:hover {
    color: var(--primary);
}

.product-card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.product-card-price .old-price {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 0.5rem;
    font-weight: 400;
}

.product-card .btn {
    margin-top: auto;
}

/* ==========================================================================
   Product Page
   ========================================================================== */

.product-page {
    padding: 2rem 0;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.product-gallery {
    position: sticky;
    top: 100px;
}

.product-main-image {
    background: var(--background-alt);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1rem;
}

.product-main-image img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
}

.product-info h1 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.product-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.product-price-box {
    background: var(--background-alt);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.product-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.product-price .iva {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
}

.product-stock {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    color: var(--success);
    font-size: 0.9rem;
}

.product-description {
    margin-bottom: 2rem;
}

.product-description h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.product-description p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.product-description ul {
    padding-left: 1.5rem;
    color: var(--text-light);
}

.product-description li {
    margin-bottom: 0.5rem;
}

.product-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.buy-button {
    flex: 1;
}

/* Affiliate Notice */
.affiliate-notice {
    background: #FFF8E5;
    border: 1px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

.affiliate-notice svg {
    vertical-align: middle;
    margin-right: 0.5rem;
}

/* ==========================================================================
   Category Page
   ========================================================================== */

.category-header {
    background: var(--background-alt);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.category-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.category-header p {
    color: var(--text-light);
}

.category-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.filter-count {
    color: var(--text-muted);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    background: var(--primary-dark);
    color: var(--white);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

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

.footer-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-section p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.7;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

/* Payment Icons */
.payment-icons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.payment-icons img {
    height: 28px;
    opacity: 0.8;
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */

.breadcrumb {
    padding: 1rem 0;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span {
    color: var(--text-muted);
    margin: 0 0.5rem;
}

.breadcrumb .current {
    color: var(--text);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 992px) {
    .product-layout {
        grid-template-columns: 1fr;
    }

    .product-gallery {
        position: static;
    }

    .nav-main {
        display: none;
    }
}

@media (max-width: 768px) {
    .header-top .container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .header-main .container {
        flex-wrap: wrap;
    }

    .search-box {
        order: 3;
        max-width: 100%;
        width: 100%;
        margin-top: 1rem;
    }

    .trust-items {
        gap: 1.5rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Utilities
   ========================================================================== */

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }

/* Section Headings */
.section-title {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin: 0.75rem auto 0;
}
