:root {
    --primary: #2b3dff;
    --primary-dark: #1a27b8;
    --bg-light: #f8faff;
    --bg-dark: #0f1115;
    --text-main: #1d1d1f;
    --text-muted: #86868b;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --border-radius-lg: 30px;
    --border-radius-md: 15px;
    --shadow-soft: 0 10px 40px rgba(0,0,0,0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', -apple-system, sans-serif; }
body { background: white; color: var(--text-main); line-height: 1.5; overflow-x: hidden; }

/* Global Utilities */
.btn-primary {
    background: var(--primary); color: white;
    padding: 18px 40px; border-radius: 50px;
    text-decoration: none; font-weight: 700;
    display: inline-block; transition: var(--transition);
    border: none; cursor: pointer; text-align: center;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-3px); box-shadow: 0 15px 30px rgba(43, 61, 255, 0.2); }

/* Navigation */
.top-bar { background: var(--bg-dark); color: white; text-align: center; padding: 10px; font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; }
nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 10%; background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 1000;
    border-bottom: 1px solid #f0f0f0;
}
.logo { font-weight: 900; font-size: 1.3rem; cursor: pointer; display: flex; align-items: center; gap: 10px; text-transform: uppercase; letter-spacing: -1px; }
.nav-links { display: flex; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--text-main); font-weight: 600; font-size: 0.9rem; }
.nav-icons { font-size: 1.3rem; cursor: pointer; position: relative; }
.cart-badge {
    position: absolute; top: -8px; right: -12px;
    background: var(--primary); color: white;
    width: 20px; height: 20px; border-radius: 50%;
    font-size: 0.7rem; display: flex; align-items: center; justify-content: center;
    font-weight: 800;
}

/* Hero Section */
.hero-container {
    display: grid; grid-template-columns: 2fr 1fr;
    grid-template-rows: repeat(2, 250px);
    gap: 20px; padding: 20px 10%; margin-bottom: 60px;
}
.hero-main {
    grid-row: span 2; border-radius: var(--border-radius-lg);
    background: #f0f0f5 url('https://images.unsplash.com/photo-1571019613454-1cb2f99b2d8b?q=80&w=2070&auto=format&fit=crop') center/cover;
    padding: 80px; display: flex; flex-direction: column; justify-content: center;
    position: relative; overflow: hidden;
}
.hero-main::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.1) 100%); z-index: 1; }
.hero-main > * { position: relative; z-index: 2; }
.hero-main h1 { font-size: 3.5rem; line-height: 1; margin-bottom: 20px; font-weight: 900; letter-spacing: -2px; }
.hero-main p { font-size: 1.1rem; color: #444; max-width: 450px; margin-bottom: 35px; }

.hero-side-top { background: #ccd5ff; border-radius: var(--border-radius-lg); padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.hero-side-bottom { background: var(--bg-dark); color: white; border-radius: var(--border-radius-lg); padding: 40px; display: flex; flex-direction: column; justify-content: center; }

/* Categories Mosaic */
.categories-grid {
    display: grid; grid-template-columns: 1.2fr 1fr 1.2fr;
    grid-template-rows: 250px 250px; gap: 20px;
    padding: 0 10%; margin-bottom: 80px;
}
.cat-card { position: relative; border-radius: var(--border-radius-md); overflow: hidden; cursor: pointer; }
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.cat-card:hover img { transform: scale(1.1); }
.cat-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, transparent 60%); }
.cat-info { position: absolute; bottom: 30px; left: 30px; color: white; z-index: 2; }
.cat-info h3 { font-size: 1.6rem; font-weight: 900; margin: 0; }

.cat-leggings { grid-column: 1; grid-row: 1 / 3; }
.cat-tops { grid-column: 2; grid-row: 1; }
.cat-conjuntos { grid-column: 2; grid-row: 2; }
.cat-shorts { grid-column: 3; grid-row: 1 / 3; }

/* Product Grid */
.section-title { font-size: 2.2rem; font-weight: 900; margin-bottom: 40px; padding: 0 10%; letter-spacing: -1px; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 40px; padding: 0 10%; margin-bottom: 100px; }
.product-card { transition: var(--transition); cursor: pointer; }
.product-image-container { position: relative; border-radius: var(--border-radius-md); overflow: hidden; background: #f5f5f7; aspect-ratio: 3/4; margin-bottom: 15px; }
.product-card img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.product-card:hover img { transform: scale(1.05); }

.product-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.1); opacity: 0; transition: var(--transition); display: flex; align-items: center; justify-content: center; }
.product-card:hover .product-overlay { opacity: 1; }
.btn-quickview { background: white; color: black; border: none; padding: 12px 24px; border-radius: 50px; font-weight: 700; font-size: 0.8rem; pointer-events: none; }

.product-category { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; font-weight: 700; margin-bottom: 5px; display: block; }
.product-info h3 { font-size: 1rem; margin-bottom: 8px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.product-info .p-price { display: flex; gap: 10px; align-items: center; }
.p-price-now { font-weight: 900; color: var(--primary); font-size: 1.1rem; }
.collection-badge { position: absolute; top: 15px; left: 15px; background: #000; color: #fff; padding: 5px 12px; font-size: 0.7rem; font-weight: 800; border-radius: 50px; z-index: 5; text-transform: uppercase; }

/* --- PRODUCT PAGE (DESKTOP FIDELITY) --- */
.p-page-wrapper { max-width: 1400px; margin: 40px auto; padding: 0 5%; }
.p-nav-breadcrumb { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 40px; }
.p-nav-breadcrumb a { color: inherit; text-decoration: none; }

.p-main-section { display: grid; grid-template-columns: 1fr 450px; gap: 80px; margin-bottom: 120px; align-items: start; }

/* Vertically Stacked Gallery */
.p-gallery-stacked { display: flex; flex-direction: column; gap: 30px; }
.p-gallery-stacked img { width: 100%; border-radius: 15px; margin-bottom: 25px; transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.6s ease; cursor: zoom-in; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.p-gallery-stacked img:hover { transform: scale(1.01); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.p-gallery-row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }

/* Sticky Buy Section */
.p-info-details { position: sticky; top: 120px; }
.p-badges-row { display: flex; gap: 10px; margin-bottom: 15px; }
.p-badge-tag { padding: 10px 20px; border-radius: 50px; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; }
.p-badge-tag.sale { background: #ff3b30; color: white; }
.p-badge-tag.new { background: #ccd5ff; color: var(--primary); }

.p-title-large { font-size: 3.5rem; line-height: 1; margin-bottom: 20px; font-weight: 900; }
.p-price-row { display: flex; align-items: baseline; gap: 15px; margin-bottom: 30px; }
.p-price-current { font-size: 2rem; font-weight: 900; color: var(--primary); }

/* Talla & Action Box */
.p-purchase-box {
    background: #f7f7f7; padding: 40px; border-radius: 25px; margin-bottom: 40px;
}
.p-label-small { font-weight: 800; font-size: 0.9rem; color: #666; margin-bottom: 20px; display: block; letter-spacing: 1px; }
.p-size-btn { 
    width: 60px; height: 60px; border-radius: 12px; border: none; 
    background: var(--primary); color: white; font-weight: 900; 
    cursor: pointer; font-size: 1.1rem;
}
.p-size-hint-small { font-size: 0.8rem; font-style: italic; color: #888; margin: 20px 0 30px; line-height: 1.5; }

.p-action-row { display: grid; grid-template-columns: 150px 1fr; gap: 15px; }
.qty-stepper-box {
    background: white; border-radius: 12px; border: 1px solid #ddd;
    display: flex; align-items: center; justify-content: space-between; padding: 10px 20px;
}
.qty-stepper-box button { background: none; border: none; font-size: 1.8rem; color: #777; cursor: pointer; }
.qty-stepper-box span { font-weight: 800; font-size: 1.3rem; }

.p-add-to-cart-btn {
    background: var(--primary); color: white; border: none; border-radius: 12px;
    font-weight: 800; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; gap: 15px;
    cursor: pointer; box-shadow: 0 15px 30px rgba(43, 61, 255, 0.2); transition: 0.3s;
}
.p-add-to-cart-btn:hover { background: var(--primary-dark); transform: translateY(-3px); }

.p-full-desc { font-size: 1.1rem; line-height: 1.9; color: #444; margin-bottom: 40px; }
.p-tag { background: #f0f0f0; padding: 10px 20px; border-radius: 50px; font-size: 0.85rem; font-weight: 700; color: #666; margin-right: 10px; }

/* Tech Section */
.p-tech-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; margin: 80px 0 40px; }
.p-tech-card { padding: 50px 30px; border-radius: 20px; text-align: center; }
.p-tech-card.blue { background: #f0f4ff; }
.p-tech-card.beige { background: #fdf8f4; }
.p-tech-card.pink { background: #fef0fb; }
.p-tech-card.grey { background: #f7f7f7; }
.p-tech-icon { font-size: 2.5rem; margin-bottom: 20px; color: var(--primary); }
.p-tech-card h4 { font-weight: 900; margin-bottom: 12px; font-size: 1.3rem; }
.p-tech-card p { font-size: 0.9rem; color: #666; line-height: 1.6; }

.p-tech-mini-chips { display: flex; justify-content: center; gap: 20px; margin-bottom: 100px; }
.chip { background: #f7f7f7; padding: 15px 40px; border-radius: 12px; font-weight: 900; font-size: 0.8rem; letter-spacing: 1px; color: #333; display: flex; align-items: center; gap: 10px; }

/* Textile Card */
.p-textile-full-card {
    background: white; border-radius: 40px; padding: 80px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 80px;
    box-shadow: 0 40px 120px rgba(0,0,0,0.04); margin-bottom: 120px;
}
.textile-info h3 { font-size: 3rem; font-weight: 900; margin-bottom: 40px; }
.textile-info p { color: #555; line-height: 1.9; font-size: 1.15rem; margin-bottom: 25px; }
.check-item { display: flex; align-items: center; gap: 15px; font-weight: 900; color: var(--primary); margin-bottom: 15px; font-size: 1.1rem; }
.textile-visual { background: #000 url('https://images.unsplash.com/photo-1550745165-9bc0b252726f?auto=format&fit=crop&q=80&w=1000') center/cover; border-radius: 30px; }

/* Cross Sell */
.p-cross-sell { margin-bottom: 120px; }
.cross-sell-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.cross-card {
    background: #fdfdfd; border: 1px solid #f0f0f0; border-radius: 30px;
    display: flex; overflow: hidden; height: 320px; cursor: pointer; transition: 0.3s;
}
.cross-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-soft); }
.cross-img { width: 45%; }
.cross-img img { width: 100%; height: 100%; object-fit: cover; }
.cross-info { padding: 45px; width: 55%; display: flex; flex-direction: column; justify-content: center; }
.cross-info h4 { font-size: 1.6rem; font-weight: 900; margin-bottom: 15px; }
.cross-price { font-weight: 800; color: var(--primary); font-size: 1.4rem; }

/* Social Feed */
.p-social-feed { margin-bottom: 120px; }
.social-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 50px; }
.social-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.social-grid img, .social-grid div { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 20px; }

/* --- CART & FOOTER --- */
.cart-sidebar {
    position: fixed; top: 0; right: -100%; width: 450px; height: 100vh;
    background: white; z-index: 3000; box-shadow: -20px 0 60px rgba(0,0,0,0.15);
    transition: 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex; flex-direction: column;
}
.cart-sidebar.active { right: 0; }
.cart-header { padding: 40px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.cart-items-container { flex-grow: 1; overflow-y: auto; padding: 40px; }
.cart-footer { padding: 40px; border-top: 1px solid #eee; background: #fafafa; }
.checkout-btn { width: 100%; background: #25d366; border-radius: 20px; font-size: 1.2rem; padding: 22px; }

footer { background: var(--bg-dark); color: white; padding: 120px 10% 60px; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 80px; margin-bottom: 80px; }
.footer-bottom { border-top: 1px solid #333; padding-top: 50px; display: flex; justify-content: space-between; color: var(--text-muted); }

.whatsapp-float { position: fixed; bottom: 50px; right: 50px; background: #25d366; width: 70px; height: 70px; border-radius: 50%; display: flex; justify-content: center; align-items: center; box-shadow: 0 20px 50px rgba(37, 211, 102, 0.4); z-index: 2000; }

/* --- RESPONSIVE --- */
@media (max-width: 1400px) {
    nav, .hero-container, .categories-grid, .section-title, .product-grid, .p-page-wrapper, footer { padding-left: 5%; padding-right: 5%; }
}
/* Social Feed (Instagram) on Product Page */
.p-social-feed { padding: 100px 10%; background: #fff; border-top: 1px solid #f0f0f0; }
.social-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 50px; }
.social-grid img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 20px; transition: 0.3s; }
.social-grid img:hover { transform: scale(1.05); }

@media (max-width: 1024px) {
    .p-page-wrapper { padding: 0 20px; }
    .p-main-section { grid-template-columns: 1fr; gap: 40px; }
    .p-info-details { position: relative; top: 0; padding: 0; }
    .p-tech-grid { grid-template-columns: 1fr 1fr; }
    .p-textile-full-card { grid-template-columns: 1fr; padding: 40px; }
    .cross-sell-grid { grid-template-columns: 1fr; }
    .social-grid { grid-template-columns: repeat(3, 1fr); }
    .hero-container { grid-template-columns: 1fr; grid-template-rows: auto; }
}

/* --- INSTAGRAM SECTION (FIDELITY FIX) --- */
.instagram-section { background: #f8faff; padding: 100px 10%; border-top: 1px solid #eef2ff; }
.ig-container { display: grid; grid-template-columns: 1fr 1.2fr; gap: 80px; align-items: center; }
.ig-content .badge { background: #000; color: white; padding: 6px 15px; border-radius: 50px; font-size: 0.75rem; font-weight: 800; text-transform: uppercase; margin-bottom: 25px; display: inline-block; }
.ig-content h2 { font-size: 3rem; font-weight: 950; line-height: 1.1; margin-bottom: 15px; letter-spacing: -2px; }
.ig-handle { color: #2d5bff; text-decoration: none; font-weight: 900; font-size: 1.25rem; display: block; margin-bottom: 30px; letter-spacing: -0.5px; transition: opacity 0.3s ease; }
.ig-handle:hover { opacity: 0.7; }
.ig-content p { color: var(--text-muted); line-height: 1.6; margin-bottom: 40px; font-size: 1.1rem; max-width: 450px; }
.ig-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ig-img img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: 25px; transition: transform 0.4s ease, box-shadow 0.4s ease; cursor: pointer; }
.ig-img img:hover { transform: translateY(-10px); box-shadow: 0 15px 35px rgba(45, 91, 255, 0.15); }

@media (max-width: 1024px) {
    .ig-container { grid-template-columns: 1fr; text-align: center; gap: 50px; }
    .ig-content p { margin: 0 auto 40px; }
}
/* --- FOOTER (FIDELITY FIX) --- */
footer { background: #0a0a0a; color: white; padding: 100px 10% 40px; border-top: 1px solid #1a1a1a; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 80px; margin-bottom: 80px; }
.footer-col h4 { font-size: 0.8rem; letter-spacing: 2px; font-weight: 800; color: white; margin-bottom: 30px; text-transform: uppercase; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 12px; }
.footer-col a { color: #888; text-decoration: none; font-size: 0.95rem; transition: color 0.3s ease; }
.footer-col a:hover { color: white; }
.footer-col p { color: #888; font-size: 0.95rem; line-height: 1.6; margin-top: 0; }

.footer-bottom { border-top: 1px solid #1a1a1a; padding-top: 40px; display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { color: #444; font-size: 0.85rem; font-weight: 500; }

@media (max-width: 1024px) {
    .footer-top { grid-template-columns: 1fr 1fr; gap: 40px; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 20px; }
}
@media (max-width: 768px) {
    .footer-top { grid-template-columns: 1fr; }
    .logo { font-size: 1rem; }
    .nav-links { display: none; }
    .product-grid { grid-template-columns: 1fr 1fr; gap: 15px; }
    
    /* Product Page Mobile Fixes - Aggressive */
    .p-page-wrapper { padding: 0 15px; margin-top: 20px; }
    .p-nav-breadcrumb { margin-bottom: 25px; font-size: 0.8rem; }
    .p-title-large { font-size: 1.65rem; line-height: 1.1; margin-bottom: 15px; }
    .p-price-row { margin-bottom: 25px; }
    .p-price-current { font-size: 1.6rem; }
    
    .p-purchase-box { padding: 20px 15px; border-radius: 20px; width: 100%; box-sizing: border-box; }
    .p-size-row { gap: 10px; }
    .p-size-btn { width: 50px; height: 50px; font-size: 0.9rem; }
    
    .p-action-row { display: flex; flex-direction: column; gap: 15px; width: 100%; }
    .qty-stepper-box { width: 100%; justify-content: center; height: 55px; border-radius: 12px; }
    .qty-stepper-box span { width: 60px; text-align: center; }
    
    .p-add-to-cart-btn { padding: 18px; width: 100%; font-size: 1rem; border-radius: 12px; letter-spacing: 0.5px; }
    
    .p-full-desc { font-size: 1rem; line-height: 1.8; }
    /* Tech Section Mobile (Capture 2) */
    .p-tech-grid { grid-template-columns: 1fr; gap: 15px; margin-bottom: 25px; }
    .p-tech-card { padding: 35px 25px; border-radius: 18px; }
    .p-tech-icon { font-size: 2rem; margin-bottom: 15px; }
    .p-tech-card h4 { font-size: 1.1rem; }
    .p-tech-card p { font-size: 0.85rem; }

    .p-tech-mini-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 60px; }
    .chip { padding: 15px 5px; flex-direction: column; gap: 8px; font-size: 0.6rem; text-align: center; }
    .chip i { font-size: 1.1rem; }

    .p-gallery-row { grid-template-columns: 1fr; }
    .cart-sidebar { width: 100%; }
    .categories-grid { display: flex; flex-direction: column; }
    .cat-card { height: 200px; margin-bottom: 15px; }
}