/* assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Playpen+Sans:wght@400;600;800&display=swap');

:root {
    /* Color Palette - Vibrant Kids Fashion, yet Premium */
    --primary: #FF6B6B; /* Vibrant Coral */
    --secondary: #4ECDC4; /* Aqua */
    --tertiary: #FFE66D; /* Sunny Yellow */
    --accent: #8A2BE2; /* Purple */
    
    --bg-color: #F8F9FA;
    --text-main: #2B2D42;
    --text-muted: #8D99AE;
    
    --white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
    
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --border-radius-pill: 50px;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    --font-sans: 'Outfit', sans-serif;
    --font-heading: 'Playpen Sans', cursive, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

@media (max-width: 900px) {
    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
}

@media (max-width: 600px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }
}

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

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

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}

.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.gap-4 { gap: 32px; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-sans);
    border: none;
    border-radius: var(--border-radius-pill);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #FF8E8B);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #6BE5DC);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.4);
}

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

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

.btn-block {
    width: 100%;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    font-size: 1rem;
    font-family: var(--font-sans);
    border: 2px solid transparent;
    background-color: rgba(0,0,0,0.03);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    background-color: var(--white);
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.15);
}

/* Alerts */
.variation-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    gap: 10px;
}
.tile-item {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 700;
    color: #334155;
    position: relative;
}
.tile-item:hover {
    border-color: var(--primary);
    background: #fffafa;
}
.tile-item.active-tile {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.15);
}
.tile-out-of-stock {
    background: #f8fafc;
    color: #94a3b8;
    border-color: #f1f5f9;
    opacity: 0.7;
}
.tile-slash {
    position: absolute;
    top: 50%;
    left: 10%;
    width: 80%;
    height: 1px;
    background: #cbd5e1;
    transform: rotate(-15deg);
}
.alert {
    padding: 16px;
    border-radius: var(--border-radius-md);
    margin-bottom: 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background-color: #FFF0F0;
    color: #D32F2F;
    border-left: 4px solid #D32F2F;
}

.alert-success {
    background-color: #F0FFF4;
    color: #388E3C;
    border-left: 4px solid #388E3C;
}

/* Authentication Pages Specific */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    position: relative;
    overflow: hidden;
}

/* Decorative Background Blobs for Auth */
.auth-bg-shapes .shape {
    position: absolute;
    filter: blur(60px);
    z-index: 0;
    opacity: 0.6;
}

.auth-bg-shapes .shape-1 {
    top: -10%; left: -10%;
    width: 500px; height: 500px;
    background: var(--primary);
    border-radius: 50%;
}

.auth-bg-shapes .shape-2 {
    bottom: -10%; right: -10%;
    width: 600px; height: 600px;
    background: var(--secondary);
    border-radius: 50%;
}

.auth-bg-shapes .shape-3 {
    top: 40%; left: 50%;
    width: 300px; height: 300px;
    background: var(--tertiary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.auth-card {
    width: 100%;
    max-width: 480px;
    padding: 40px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-heading);
    margin-bottom: 10px;
}

.auth-logo i {
    color: var(--secondary);
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    color: var(--text-muted);
}

.auth-footer a {
    font-weight: 600;
}

/* Animations */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Products Grid System (Globally available for all pages) */
.bg-light { background: #FAFAFB; }
.text-sm { font-size: 0.85rem; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 30px; }
.d-desktop-only { display: inline-block; }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-card {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--tertiary);
    color: #000;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
}

.product-img-placeholder {
    aspect-ratio: 4 / 3;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.placeholder-bg-1 { background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%); }
.placeholder-bg-2 { background: linear-gradient(135deg, #84fab0 0%, #8fd3f4 100%); }
.placeholder-bg-3 { background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%); }
.placeholder-bg-4 { background: linear-gradient(135deg, #fad0c4 0%, #ffd1ff 100%); }

.product-img-placeholder i {
    transition: transform var(--transition-smooth);
}

.product-card:hover .product-img-placeholder i {
    transform: scale(1.1);
}

.product-info {
    padding: 20px;
    background: var(--white);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.1rem;
    font-family: var(--font-sans);
    color: var(--text-main);
    margin-bottom: auto;
    font-weight: 700;
}

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

.product-bottom {
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-top: 15px;
}

.add-to-cart-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 107, 107, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all var(--transition-fast);
}

.add-to-cart-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.1) rotate(90deg);
}

/* Global Responsive Utilities */
.d-mobile-only { display: none; }
.d-desktop-only { display: inline-block; }

@media (max-width: 900px) {
    .d-desktop-only { display: none !important; }
    .d-mobile-only { display: block !important; }
    
    .py-5 { padding: 40px 0 !important; }
    .my-5 { margin-top: 20px !important; margin-bottom: 20px !important; }
}

/* Section Spacing */
.py-5 { padding: 80px 0; }
.my-5 { margin: 80px 0; }
.mb-4 { margin-bottom: 40px; }
.text-center { text-align: center; }

/* Grid Systems */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

@media (max-width: 1100px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
}

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

/* Product Detail Enhancements */
.angle-switcher {
    padding: 10px 0;
}

.angle-btn {
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 700;
    border: 2px solid #eee;
    background: #fff;
    border-radius: var(--border-radius-pill);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-muted);
}

.angle-btn:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.angle-btn.active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: var(--white);
    box-shadow: 0 4px 10px rgba(78, 205, 196, 0.4);
    transform: translateY(-2px);
}

.stock-badge-premium {
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-out;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.stock-badge-premium i {
    filter: drop-shadow(0 0 5px rgba(255, 107, 107, 0.4));
}

.swatch-item {
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.swatch-item:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

.swatch-out-of-stock {
    opacity: 0.6;
}

.swatch-slash {
    position: absolute;
    top: 50%;
    left: -10%;
    width: 120%;
    height: 2px;
    background: #ff4d4d;
    transform: rotate(45deg);
    pointer-events: none;
}

/* Professional Gallery Styling */
.angle-pill {
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.angle-pill:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.angle-pill.active {
    background: #4fd1c5; /* Matching the teal in screenshot */
    color: #fff;
    border-color: #4fd1c5;
    box-shadow: 0 4px 12px rgba(79, 209, 197, 0.3);
}

.angle-pill.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
}

.gallery-thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.angle-thumb-item {
    text-align: center;
}

.thumb-box-v2 {
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 12px;
    border: 2px solid #edf2f7;
    overflow: hidden;
    cursor: pointer;
    background: #f8fafc;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.thumb-box-v2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-box-v2:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.thumb-box-v2.active-thumb {
    border-color: #ff6b6b;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.25);
}

.angle-label {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.thumb-box-v2.active-thumb + .angle-label {
    color: #ff6b6b;
}

.placeholder-thumb-icon {
    font-size: 1.5rem;
    color: #e2e8f0;
}

/* Size Chart Link Styling */
.size-chart-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ff6b6b;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.size-chart-link:hover {
    color: #ee5253;
    transform: translateX(3px);
}

.size-chart-link i {
    font-size: 1.1rem;
}

.p-icon-placeholder {
    width: 100%;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #cbd5e1;
}

.p-main-img-detail {
    width: 100%;
    height: 380px; /* Precise height for professional balance */
    object-fit: contain;
    background: #fff;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: block;
}

.main-image-wrap {
    background: #fff;
    position: relative;
    border: 1px solid #f1f5f9;
}

.product-badge-detail {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #ff6b6b;
    color: #fff;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

@media (max-width: 900px) {
    .p-main-img-detail {
        height: 350px;
    }
    .gallery-thumbnails-grid {
        gap: 8px;
    }
    .angle-label {
        font-size: 9px;
    }
}

.variation-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    appearance: none;
}

/* Premium Variation Modal (Jumia Style) */
.v-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    align-items: center; justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}
.v-modal.show { display: flex; }
.v-modal-content {
    background: #fff;
    width: 95%;
    max-width: 550px;
    border-radius: 12px;
    padding: 25px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    animation: vSlideUp 0.3s ease-out;
}
@keyframes vSlideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.v-modal-close {
    position: absolute;
    top: 15px; right: 15px;
    font-size: 1.8rem;
    cursor: pointer;
    color: #333;
    line-height: 1;
}
.v-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}
.v-item-info h4 { margin: 0; font-size: 1.1rem; color: #333; }
.v-item-info p { margin: 4px 0; font-size: 0.95rem; font-weight: 700; color: #333; }
.v-stock-alert { color: #d0021b; font-size: 0.85rem; font-weight: 600; margin-top: 4px; }
.v-qty-ctrl { display: flex; align-items: center; gap: 12px; }
.v-qty-btn {
    width: 44px; height: 38px;
    border-radius: 4px;
    border: none;
    background: #c3c3c3;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.v-qty-btn:hover:not(:disabled) { background: #adb5bd; }
.v-qty-btn.plus { background: #f68b1e; }
.v-qty-btn.plus:hover { background: #e67e22; }
.v-qty-val { width: 30px; text-align: center; font-weight: 700; font-size: 1.1rem; }

.v-unavailable-text {
    margin-top: 20px;
    font-size: 0.95rem;
    color: #666;
}
.v-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 30px;
}
.btn-v-continue { border: 2px solid #f68b1e; color: #f68b1e; background: #fff; padding: 14px; border-radius: 6px; font-weight: 700; cursor: pointer; text-align: center; text-transform: uppercase; font-size: 0.9rem; }
.btn-v-cart { background: #c3c3c3; color: #fff; border: none; padding: 14px; border-radius: 6px; font-weight: 700; cursor: pointer; text-align: center; text-transform: uppercase; transition: background 0.3s; font-size: 0.9rem; }
.btn-v-cart.active { background: #f68b1e; }
