/* 
 * Babydiaper.lk - Premium Ecommerce Styles 
 * Inspired by Woolworths.com.au & Modern Baby Care Brands
 */

:root {
    /* Color Palette */
    --primary-color: #00bcd4;
    /* Fresh Turquoise/Blue - Trustworthy */
    --primary-dark: #0097a7;
    --secondary-color: #ff80ab;
    /* Soft Pink - Caring */
    --accent-color: #ffca28;
    /* Warm Yellow - Joy */
    --text-dark: #2c3e50;
    --text-medium: #546e7a;
    --text-light: #90a4ae;
    --bg-light: #f5f7fa;
    /* Very subtle blue-grey tint */
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --error-color: #f44336;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 4rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Global Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body,
html {
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    max-width: 100%;
    overflow-x: hidden !important;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

@media (min-width: 768px) {
    .container {
        padding-left: var(--spacing-sm);
        padding-right: var(--spacing-sm);
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.1rem;
}

@media (min-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    h4 {
        font-size: 1.25rem;
    }
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary-color);
}

.text-muted {
    color: var(--text-medium);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: var(--transition-normal);
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Header & Nav */
.top-bar {
    background-color: var(--primary-dark);
    color: white;
    font-size: 0.875rem;
    padding: 0.5rem 0;
    text-align: center;
}

.main-header {
    background-color: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

body.admin-bar .main-header {
    top: 46px;
}

@media (min-width: 782px) {
    body.admin-bar .main-header {
        top: 32px;
    }
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

@media (min-width: 768px) {
    .header-inner {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

@media (min-width: 768px) {
    .logo {
        font-size: 1.85rem;
        gap: 0.5rem;
    }
}

.logo span {
    color: var(--secondary-color);
}

.search-bar {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
    position: relative;
    display: none;
    /* Mobile first hidden, shown on desktop */
}

@media (min-width: 768px) {
    .search-bar {
        display: block;
    }
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid var(--bg-light);
    background-color: var(--bg-light);
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: white;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 768px) {
    .nav-icons {
        gap: 1.5rem;
    }
}

.icon-btn {
    position: relative;
    font-size: 1.25rem;
    color: var(--text-dark);
}

.badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background-color: var(--error-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Category Nav (Desktop) */
.category-nav {
    border-top: 1px solid var(--border-color);
    display: none;
}

@media (min-width: 768px) {
    .category-nav {
        display: block;
    }
}

.nav-list {
    display: flex;
    gap: 2rem;
    padding: 1rem 0;
}

.nav-link {
    font-weight: 500;
    color: var(--text-medium);
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #e0f7fa 0%, #fff9c4 100%);
    padding: 2.5rem 0;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    overflow: hidden;
    position: relative;
    text-align: center;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
    position: relative;
    margin: 0 auto;
}

.hero-tag {
    display: inline-block;
    background-color: white;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.hero h1 {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.hero p {
    font-size: 1rem;
    color: var(--text-medium);
    margin-bottom: 1.5rem;
}

.hero-image {
    display: none;
}

@media (min-width: 768px) {
    .hero {
        padding: 6rem 0;
        display: flex;
        align-items: center;
        text-align: left;
    }

    .hero-content {
        margin: 0;
    }

    .hero h1 {
        font-size: 3rem;
        margin-bottom: 1rem;
    }

    .hero p {
        font-size: 1.125rem;
        margin-bottom: 2rem;
    }

    .hero-tag {
        font-size: 0.875rem;
    }

    .hero-image {
        display: block;
        position: absolute;
        right: -50px;
        top: 50%;
        transform: translateY(-50%);
        width: 50%;
        max-width: 600px;
    }

    .hero-image img {
        width: 100%;
        height: auto;
        object-fit: contain;
    }
}

/* Section Common */
.section {
    padding: var(--spacing-lg) 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: var(--spacing-md);
}

.section-title {
    font-size: 1.75rem;
    color: var(--text-dark);
}

/* Size/Brand Grid */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
}

@media(min-width: 640px) {
    .grid-cards {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1.5rem;
    }
}

.card-item {
    background: white;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition-normal);
    border: 1px solid transparent;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.card-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.card-label {
    font-weight: 600;
    color: var(--text-dark);
}

/* Product Cards */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* 2 col on mobile */
    gap: 1rem;
}

@media (min-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

.product-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
    position: relative;
    border: 1px solid var(--bg-light);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 1;
}

.product-img-wrapper {
    position: relative;
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
    background-color: white;
    overflow: hidden;
}

.product-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.05);
}

.product-info {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

@media (min-width: 768px) {
    .product-info {
        padding: 1rem;
    }
}

.product-category {
    font-size: 0.65rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
    .product-category {
        font-size: 0.75rem;
    }
}

.product-title {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
    line-height: 1.4;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .product-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        line-height: 1.4;
    }
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .product-price {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
}

.product-actions {
    margin-top: auto;
}

.btn-add-cart {
    width: 100%;
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    transition: 0.2s;
}

.btn-add-cart:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Features Section */
.features-section {
    background-color: white;
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-lg);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
}

@media (min-width: 640px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .feature-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.feature-item {
    text-align: center;
    padding: 1rem;
}

.feature-icon-box {
    width: 60px;
    height: 60px;
    background-color: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.feature-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-text {
    font-size: 0.9rem;
    color: var(--text-medium);
}

/* Footer */
footer {
    background-color: #f8f9fa;
    /* Woolworths style light footer */
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 5rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-col h4 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-medium);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Utilities */
.hidden-mobile {
    display: none;
}

.hidden-desktop {
    display: block;
}

@media (min-width: 768px) {
    .hidden-mobile {
        display: block;
    }

    .hidden-desktop {
        display: none;
    }
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Bottom Nav (Optional, app-like feel) */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    z-index: 999;
}

@media (min-width: 768px) {
    .mobile-nav {
        display: none;
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-medium);
    gap: 0.25rem;
}

.mobile-nav-item.active {
    color: var(--primary-color);
}

.mobile-nav-item i {
    font-size: 1.25rem;
}

/* Shop Page Layout */
.shop-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

@media (min-width: 900px) {
    .shop-layout {
        grid-template-columns: 250px 1fr;
    }
}

.filters-sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    height: fit-content;
}

.filter-group {
    margin-bottom: 2rem;
}

.filter-group h4 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.filter-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
}

/* Product Detail Page */
#product-detail-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

@media (min-width: 768px) {
    #product-detail-container {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

.product-gallery {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 1px solid var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-details-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-brand-badge {
    text-transform: uppercase;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 0.875rem;
}

.product-title-large {
    font-size: 2rem;
    /* Mobile */
    font-weight: 700;
}

@media (min-width: 768px) {
    .product-title-large {
        font-size: 2.5rem;
    }
}

.product-price-large {
    font-size: 2rem;
    color: var(--text-dark);
    font-weight: 700;
}

.stock-status {
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stock-status.in-stock {
    color: var(--success-color);
}

.stock-status.out-of-stock {
    color: var(--error-color);
}

.product-options {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.option-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.size-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.size-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    transition: var(--transition-fast);
}

.size-btn:hover,
.size-btn.active {
    border-color: var(--primary-color);
    background-color: var(--primary-color);
    color: white;
}

.qty-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-selector button {
    width: 36px;
    height: 36px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-selector input {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    font-weight: 600;
}

.btn-large {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

.review-stars {
    color: var(--accent-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-features-list ul {
    list-style: none;
    margin-top: 1rem;
}

.product-features-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-medium);
}

.product-features-list li i {
    color: var(--success-color);
}

.delivery-snippet {
    display: flex;
    gap: 1rem;
    background: #e3f2fd;
    padding: 1rem;
    border-radius: var(--radius-md);
    color: var(--text-dark);
    margin-top: 1rem;
}

.delivery-snippet i {
    font-size: 1.5rem;
    color: var(--primary-color);
}