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

:root {
    --primary: #7000ff;
    --primary-light: #f0e6ff;
    --primary-dark: #5200c4;
    --secondary: #d4af37; /* Royal Gold */
    --secondary-hover: #b89326;
    --bg: #f7f6f9;
    --card-bg: #ffffff;
    --text: #191622;
    --text-muted: #6e6b7b;
    --border: #e2dfeb;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --shadow-sm: 0 2px 8px rgba(112, 0, 255, 0.04);
    --shadow-md: 0 10px 30px rgba(112, 0, 255, 0.08);
    --shadow-lg: 0 20px 40px rgba(112, 0, 255, 0.12);
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

/* Common Layout Containers */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header & Navigation Bar */
header.site-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

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

.logo a {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    padding: 8px;
    transition: var(--transition);
}

.mobile-nav-toggle:hover {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    gap: 16px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    position: relative;
    padding: 6px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

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

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-form {
    display: flex;
    align-items: center;
    position: relative;
}

.search-form input {
    padding: 10px 16px;
    padding-right: 40px;
    border: 1px solid var(--border);
    border-radius: 30px;
    background: #fdfdfd;
    outline: none;
    font-size: 0.9rem;
    width: 170px;
    transition: var(--transition);
}

.search-form input:focus {
    width: 230px;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(112, 0, 255, 0.15);
}

.search-form button {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}

.cart-icon {
    position: relative;
    font-size: 1.3rem;
    padding: 8px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

.user-btn {
    font-size: 1.3rem;
    padding: 8px;
    background: var(--bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Home Page Hero Section */
.hero-section {
    position: relative;
    padding: 100px 0;
    background: radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 10% 85%, rgba(112, 0, 255, 0.08) 0%, transparent 60%);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text);
}

.hero-content h1 span {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 35px;
    max-width: 550px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: 0 5px 20px rgba(112, 0, 255, 0.25);
}

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

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

.btn-secondary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
}

.btn-accent {
    background: linear-gradient(45deg, var(--secondary), var(--secondary-hover));
    color: #fff;
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.25);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.35);
}

.hero-image {
    position: relative;
    display: flex;
    justify-content: center;
}

.hero-image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 4px solid #fff;
    transform: rotate(2deg);
    transition: var(--transition);
}

.hero-image-wrapper:hover {
    transform: rotate(0deg) scale(1.02);
}

/* Category Grid Section */
.section-title {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.section-title h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary);
    margin: 10px auto 0;
    border-radius: 2px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1rem;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 70px;
}

.category-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.category-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.category-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
}

.category-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Product Cards Grid */
.products-section {
    padding: 60px 0;
}

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

.product-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(112, 0, 255, 0.2);
}

.product-image-container {
    position: relative;
    background: #fdfdfd;
    height: 240px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image-container img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--secondary);
    color: #fff;
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.8rem;
}

.product-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f3f2f7;
}

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

.add-to-cart-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(112, 0, 255, 0.15);
}

.add-to-cart-btn:hover {
    background: var(--secondary);
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
    transform: rotate(90deg);
}

/* Product Detail Page styling */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    padding: 50px 0;
}

.detail-gallery {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 480px;
    overflow: hidden;
}

.detail-gallery img {
    max-height: 100%;
    object-fit: contain;
}

.detail-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-category {
    font-size: 0.9rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 10px;
}

.detail-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.detail-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.stock-status {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

.stock-in {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stock-out {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.detail-desc {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 25px;
}

.detail-actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fff;
    overflow: hidden;
}

.quantity-control button {
    background: none;
    border: none;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-control button:hover {
    background: var(--bg);
    color: var(--primary);
}

.quantity-control input {
    width: 50px;
    height: 45px;
    border: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    outline: none;
}

/* Shopping Cart View */
.cart-wrapper {
    display: grid;
    grid-template-columns: 2.2fr 0.9fr;
    gap: 40px;
    padding: 50px 0;
}

.cart-table-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 2fr 1fr 1.2fr 80px;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: #fdfdfd;
    border: 1px solid var(--border);
}

.cart-item-info h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.cart-item-price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.cart-item-total {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    text-align: right;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--danger);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    justify-self: end;
}

.cart-item-remove:hover {
    transform: scale(1.1);
}

.cart-summary-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
}

.summary-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 15px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.summary-row.total {
    border-top: 1px solid var(--border);
    padding-top: 15px;
    margin-top: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
}

/* Authentication Panels */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 80px 0;
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-md);
}

.auth-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.auth-desc {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: #fdfdfd;
    outline: none;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(112, 0, 255, 0.1);
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

/* Checkout Portal */
.checkout-wrapper {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 40px;
    padding: 50px 0;
}

/* Customer Portal / Account page */
.account-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    padding: 50px 0;
}

.account-sidebar {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    height: fit-content;
    box-shadow: var(--shadow-sm);
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.account-nav-btn {
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-nav-btn:hover, .account-nav-btn.active {
    background: var(--primary-light);
    color: var(--primary);
}

.account-content {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.data-table th, .data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.data-table th {
    background: #fdfdfd;
    font-weight: 600;
    color: var(--text);
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.status-pending { background: #fef3c7; color: #d97706; }
.status-processing { background: #dbeafe; color: #2563eb; }
.status-shipped { background: #fae8ff; color: #c084fc; }
.status-delivered { background: #d1fae5; color: #059669; }
.status-cancelled { background: #fee2e2; color: #dc2626; }

/* Filter Sidebars */
.store-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    padding: 50px 0;
}

.filter-sidebar {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 25px;
    height: fit-content;
    box-shadow: var(--shadow-sm);
}

.filter-group {
    margin-bottom: 25px;
}

.filter-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.filter-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

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

.filter-list a.active, .filter-list a:hover {
    color: var(--primary);
    font-weight: 600;
}

/* Footer Section */
footer.site-footer {
    background: #191622;
    color: #bdaeeb;
    padding: 60px 0 30px;
    border-top: 1px solid #28233a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(45deg, #fff, var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

.footer-col h3 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col ul a {
    color: #bdaeeb;
}

.footer-col ul a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #28233a;
    font-size: 0.9rem;
}

/* Alert notifications banner */
.flash-message {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flash-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.flash-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Responsive Overrides */
@media (max-width: 992px) {
    .hero-grid, .detail-grid, .cart-wrapper, .checkout-wrapper, .account-wrapper, .store-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .hero-content h1 {
        font-size: 2.8rem;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Responsive Menu Overlay rules */
    .mobile-nav-toggle {
        display: block;
        order: 2;
    }
    
    .logo {
        order: 1;
    }
    
    .nav-actions {
        order: 3;
    }
    
    #siteNav {
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: #fff;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease-in-out;
        z-index: 99;
        order: 4;
    }
    
    #siteNav.active {
        max-height: 500px;
    }
    
    #siteNav .nav-links {
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 15px 0;
        align-items: stretch;
    }
    
    #siteNav .nav-links li {
        width: 100%;
        text-align: center;
    }
    
    #siteNav .nav-links a {
        display: block;
        padding: 14px 20px;
        width: 100%;
    }
    
    #siteNav .nav-links a::after {
        display: none;
    }
    
    #siteNav .nav-links a:hover {
        background: var(--primary-light);
        color: var(--primary);
    }
}

@media (max-width: 576px) {
    .header-container {
        flex-wrap: wrap;
        height: auto;
        padding: 15px;
        gap: 15px;
    }
    
    .search-form {
        width: 100%;
        order: 5;
        margin-top: 5px;
    }
    
    .search-form input {
        width: 100% !important;
    }
    
    #siteNav {
        top: 135px; /* Adjust dropdown height for wrapped search bar */
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}
