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

:root {
    --primary-color: #0f172a;       /* Slate Dark */
    --accent-color: #10b981;        /* Vibrant Emerald Green */
    --accent-hover: #059669;
    --bg-color: #f8fafc;
    --card-bg: #FFFFFF;
    --text-main: #0F172A;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 70px;
    --border-radius-lg: 1.25rem;
    --border-radius-md: 0.75rem;
}

/* --- Wireframe Components --- */
.hero-banner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    margin-top: 1.5rem;
    overflow: hidden;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--primary-color);
}

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

.hero-btn {
    align-self: flex-start;
    padding: 1rem 2rem;
    background: var(--accent-color);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 99px;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.3);
}

.hero-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    color: white;
}

.hero-image {
    position: relative;
    z-index: 1;
}

.hero-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 400px;
}

.usp-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.usp-item {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.usp-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ecfdf5;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.usp-text h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}

.usp-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.floating-cart-pill {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--card-bg);
    border-radius: 99px;
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 999;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
}

.floating-cart-pill.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.floating-cart-images {
    display: flex;
    align-items: center;
}

.floating-cart-images img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
    margin-left: -15px;
    background: #f1f5f9;
}

.floating-cart-images img:first-child {
    margin-left: 0;
}

.floating-cart-text {
    display: flex;
    flex-direction: column;
    padding: 0 0.5rem;
}

.floating-cart-title {
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--primary-color);
    letter-spacing: 0.5px;
}

.floating-cart-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

.floating-cart-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    padding-top: var(--header-height);
    overflow-x: hidden;
}

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

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

button, input {
    font-family: inherit;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Glassmorphism Header */
.store-header {
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

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

.search-bar {
    flex-grow: 1;
    max-width: 500px;
    position: relative;
}

.search-bar input {
    width: 100%;
    background: #F1F5F9;
    border: 2px solid transparent;
    padding: 0.6rem 1rem 0.6rem 2.5rem;
    border-radius: 99px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    background: #FFFFFF;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.search-bar i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.action-btn {
    background: #F1F5F9;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.action-btn:hover {
    background: var(--primary-color);
    color: #FFFFFF;
    transform: translateY(-2px);
}

.cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent-color);
    color: #FFFFFF;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #FFFFFF;
}

/* Category Sections on Home */
.home-category-section {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.home-category-section:last-child {
    border-bottom: none;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.category-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-title i {
    color: var(--primary-color);
}

.view-all-btn {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-all-btn:hover {
    gap: 0.75rem;
    color: var(--accent-color);
}

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

.bundle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Product Card - Neumorphic / Premium */
.product-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 0.75rem;
    transition: var(--transition);
    position: relative;
    border: 1px solid rgba(0,0,0,0.03);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(79, 70, 229, 0.1);
}

.card-img-wrap {
    background: #F8FAFC;
    border-radius: var(--border-radius-md);
    padding-top: 100%;
    position: relative;
    overflow: hidden;
    margin-bottom: 1rem;
}

.card-img-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .card-img-wrap img {
    transform: scale(1.08);
}

.pack-deal-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #6366f1;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-md);
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: var(--shadow-sm);
}

.sold-out-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 800;
    z-index: 10;
    letter-spacing: 1px;
}

.product-tag-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: var(--accent-color);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 99px;
    font-size: 0.6rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: var(--shadow-sm);
}

.wishlist-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.wishlist-btn:hover {
    color: #EF4444;
    background: #FFFFFF;
}

.wishlist-btn.active {
    color: #EF4444;
}

.card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.p-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.p-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-main);
}

.p-compare {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.p-name {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.p-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: auto;
    margin-bottom: 0.5rem;
}

/* Action Button Container */
.p-action {
    display: flex;
    justify-content: flex-end;
}

.add-btn {
    background: var(--primary-color);
    color: #FFFFFF;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
}

.add-btn:hover {
    background: var(--accent-color);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.qty-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #F1F5F9;
    border-radius: 99px;
    padding: 4px;
    width: 90px;
    height: 36px;
}

.qty-control button {
    background: #FFFFFF;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.qty-control button:hover {
    color: var(--primary-color);
}

.qty-control span {
    font-weight: 700;
    font-size: 0.9rem;
}

/* Footer */
.store-footer {
    background: #FFFFFF;
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
}

.footer-col h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

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

/* Mobile Adjustments */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .header-container {
        padding: 0 1rem;
    }
    
    .search-bar {
        display: none; /* Hide on mobile header, show in an expanded view or below header */
    }
    
    .pack-deal-badge {
        font-size: 0.55rem !important;
        padding: 0.15rem 0.35rem !important;
        top: 6px !important;
        left: 6px !important;
        border-radius: 4px !important;
    }
    
    /* 3 Columns on mobile as requested */
    .product-grid, .product-grid.grid-cols-mobile-3 {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }
    .product-grid.grid-cols-mobile-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .product-grid.grid-cols-mobile-1 {
        grid-template-columns: repeat(1, 1fr);
        gap: 0.5rem;
    }
    
    .bundle-grid, .bundle-grid.grid-cols-mobile-2 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .bundle-grid.grid-cols-mobile-1 {
        grid-template-columns: repeat(1, 1fr);
        gap: 0.5rem;
    }
    
    .product-card {
        padding: 0.4rem;
        border-radius: var(--border-radius-md);
    }
    
    .p-price { font-size: 0.85rem; }
    .p-compare { font-size: 0.65rem; }
    .p-name { 
        font-size: 0.7rem; 
        line-height: 1.2;
        height: 2.5rem;
    }
    .p-meta { font-size: 0.6rem; }
    
    .add-btn {
        width: 28px;
        height: 28px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .footer-grid .footer-col:nth-child(1),
    .footer-grid .footer-col:nth-child(4) {
        grid-column: 1 / -1;
    }
}

/* --- Inner Pages CSS --- */

/* Catalog / All Products Layout */
.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
    margin-top: 2rem;
}

.sidebar-filter {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    position: sticky;
    top: calc(var(--header-height) + 2rem);
}

.filter-section {
    margin-bottom: 2rem;
}
.filter-section:last-child {
    margin-bottom: 0;
}

.filter-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.filter-list {
    list-style: none;
    max-height: 250px;
    overflow-y: auto;
}

.filter-list li {
    margin-bottom: 0.5rem;
}

.filter-list label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-main);
    cursor: pointer;
}

.filter-list input[type="checkbox"] {
    accent-color: var(--accent-color);
    width: 16px;
    height: 16px;
}

/* Price Range Inputs */
.price-range-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-range-inputs input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: 0.9rem;
}

.price-range-inputs input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Mobile Filter Toggle */
.mobile-filter-toggle {
    display: none;
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    z-index: 998;
    border: none;
    cursor: pointer;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 992px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar-filter {
        display: none; /* Hide on mobile by default */
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        border-radius: 20px 20px 0 0;
        max-height: 80vh;
        overflow-y: auto;
        box-shadow: 0 -10px 40px rgba(0,0,0,0.1);
        padding: 2rem;
    }
    
    .sidebar-filter.active {
        display: block;
        animation: slideUp 0.3s ease-out;
    }
    
    .mobile-filter-toggle {
        display: flex;
    }
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Collection / Catalog Header */
.catalog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.catalog-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.catalog-count-badge {
    background: #ecfdf5;
    color: var(--accent-color);
    padding: 0.5rem 1rem;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.9rem;
}

.sort-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    font-size: 0.95rem;
    background: white;
    color: var(--text-main);
    cursor: pointer;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    border: 1px dashed var(--border-color);
}

.empty-state i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.empty-state .btn-primary {
    background: var(--accent-color);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 99px;
    font-weight: 700;
    display: inline-block;
}

/* Product Detail Page */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 1.5rem 0;
}

.breadcrumb a {
    color: var(--primary-color);
    font-weight: 600;
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.product-gallery .main-image-container {
    width: 100%;
    border-radius: var(--border-radius-md);
    background: #F8FAFC;
    padding: 2rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.product-gallery .thumbnails {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
}

.product-gallery .thumbnails img {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius-md);
    border: 2px solid transparent;
    cursor: pointer;
    background: #F8FAFC;
    object-fit: contain;
}

.product-gallery .thumbnails img.active {
    border-color: var(--accent-color);
}

.product-info h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.product-info .price-block {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    margin: 1.5rem 0;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.product-info .current-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
}

.product-info .compare-price {
    font-size: 1.2rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.variant-selector {
    margin-bottom: 2rem;
}

.variant-selector h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.variant-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    background: white;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

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

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

.add-to-cart-btn {
    flex-grow: 1;
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: var(--border-radius-md);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.add-to-cart-btn:hover {
    background: var(--accent-hover);
}

.volume-deals {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px dashed var(--border-color);
}

.volume-deal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #f8fafc;
    border: 1px dashed #94a3b8;
    border-radius: var(--border-radius-md);
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 1rem;
    }
    
    .product-tag-badge {
        font-size: 0.5rem !important;
        padding: 0.15rem 0.35rem !important;
        bottom: 5px !important;
        left: 5px !important;
    }
}
