/* ==================== 
   Royal Collection E-Commerce
   Main Stylesheet
==================== */

/* CSS Variables */
:root {
    --primary-color: #8B1538;
    --primary-dark: #6B0F2C;
    --primary-light: #B91C4C;
    --secondary-color: #D4AF37;
    --secondary-dark: #B8941F;
    --text-dark: #2C3E50;
    --text-light: #6C757D;
    --bg-light: #F8F9FA;
    --white: #FFFFFF;
    --success: #28A745;
    --danger: #DC3545;
    --warning: #FFC107;
    --font-primary: 'Poppins', sans-serif;
    --font-heading: 'Playfair Display', serif;
    --shadow: 0 2px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
}

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

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

/* ==================== 
   Top Bar
==================== */
.top-bar {
    font-size: 0.85rem;
}

/* ==================== 
   Navigation
==================== */
.navbar {
    padding: 1rem 0;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.navbar-brand:hover .logo-text {
    color: var(--primary-dark);
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    padding: 0.5rem 1rem !important;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 70%;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
}

.dropdown-item {
    padding: 0.7rem 1.5rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* ==================== 
   Buttons
==================== */
.btn {
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--text-dark);
}

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

/* ==================== 
   Hero Section
==================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: rgba(255,255,255,0.03);
    transform: rotate(15deg);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-btn {
    background: var(--secondary-color);
    color: var(--text-dark);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    display: inline-block;
    transition: var(--transition);
}

.hero-btn:hover {
    background: var(--secondary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.4);
    color: var(--text-dark);
}

.hero-image {
    position: relative;
}

.hero-image img {
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

/* ==================== 
   Section Headers
==================== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    margin-top: 1rem;
}

/* ==================== 
   Category Cards
==================== */
.category-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
    height: 100%;
}

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

.category-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--white);
}

.category-card h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.category-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.category-card .btn {
    padding: 0.4rem 1.5rem;
    font-size: 0.9rem;
}

/* ==================== 
   Product Cards
==================== */
.product-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    position: relative;
}

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

.product-image {
    position: relative;
    overflow: hidden;
    padding-top: 100%;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--secondary-color);
    color: var(--text-dark);
    padding: 0.3rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    z-index: 2;
}

.product-badge.sale {
    background: var(--danger);
    color: var(--white);
}

.product-wishlist {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    transition: var(--transition);
    z-index: 2;
}

.product-wishlist:hover {
    background: var(--danger);
    color: var(--white);
}

.product-info {
    padding: 1.5rem;
}

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

.product-title {
    font-size: 1rem;
    color: var(--text-dark);
    margin: 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3rem;
}

.product-title a:hover {
    color: var(--primary-color);
}

.product-rating {
    color: var(--secondary-color);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.product-rating span {
    color: var(--text-light);
    margin-left: 0.3rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.price-current {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.price-original {
    font-size: 0.9rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.price-discount {
    font-size: 0.75rem;
    background: var(--success);
    color: var(--white);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.85rem;
}

/* ==================== 
   Product Detail Page
==================== */
.product-gallery {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: var(--shadow);
}

.product-gallery .main-image {
    width: 100%;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.product-details {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.product-details h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.product-details .price {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.product-details .price del {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-left: 1rem;
}

.product-meta {
    margin: 1.5rem 0;
    padding: 1rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.product-meta-item {
    display: flex;
    margin-bottom: 0.5rem;
}

.product-meta-item strong {
    width: 100px;
    color: var(--text-light);
}

.size-option,
.color-option {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.size-option:hover,
.size-option.active,
.color-option:hover,
.color-option.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--white);
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 2px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    width: fit-content;
}

.quantity-selector button {
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-selector button:hover {
    background: var(--primary-color);
    color: var(--white);
}

.quantity-selector input {
    width: 60px;
    height: 40px;
    border: none;
    text-align: center;
    font-weight: 600;
}

.coupon-display {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px dashed var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1.5rem 0;
}

.coupon-code {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 2px;
    display: inline-block;
    margin-top: 0.5rem;
}
.product-add-section {
        max-width: 450px; /* Prevents the button from becoming excessively wide on wide monitors */
    }
    
    .product-add-section .add-to-cart {
        padding: 0.8rem 2rem; /* Comfortable desktop padding */
        white-space: nowrap;  /* Ensures text never breaks */
    }
    .quantity-selector {
    flex-shrink: 0; 
}
/* ==================== 
   Cart Page
==================== */
.cart-item {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: var(--border-radius);
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h4 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.cart-item-details .variant {
    color: var(--text-light);
    font-size: 0.9rem;
}

.cart-item-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 100px;
    text-align: right;
}

.cart-summary {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.cart-summary h4 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--bg-light);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.summary-row.discount {
    color: var(--success);
}

.summary-row.total {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    padding-top: 1rem;
    border-top: 2px solid var(--bg-light);
    margin-top: 1rem;
}

.coupon-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.coupon-form input {
    flex: 1;
}

.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-cart i {
    font-size: 5rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* ==================== 
   Checkout Page
==================== */
.checkout-progress {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 0 2rem;
}

.progress-step::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -50%;
    width: 100%;
    height: 3px;
    background: #ddd;
    z-index: -1;
}

.progress-step:last-child::after {
    display: none;
}

.progress-step.completed::after {
    background: var(--success);
}

.step-number {
    width: 40px;
    height: 40px;
    background: #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.progress-step.active .step-number,
.progress-step.completed .step-number {
    background: var(--primary-color);
    color: var(--white);
}

.progress-step.completed .step-number {
    background: var(--success);
}

.step-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

.progress-step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.checkout-form {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.checkout-form .form-label {
    font-weight: 500;
    color: var(--text-dark);
}

.checkout-form .form-control {
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
}

.checkout-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: none;
}

.payment-option {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.payment-option:hover,
.payment-option.selected {
    border-color: var(--primary-color);
    background: rgba(139, 21, 56, 0.05);
}

.payment-option input[type="radio"] {
    margin-right: 1rem;
}

.payment-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.payment-option i {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: var(--primary-color);
}

.order-review {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.review-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.review-item img {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
}

/* ==================== 
   Thank You Page
==================== */
.thank-you-section {
    text-align: center;
    padding: 4rem 2rem;
}

.thank-you-icon {
    width: 100px;
    height: 100px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 3rem;
    color: var(--white);
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.order-confirmation {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 0 auto;
}

.order-id {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    display: inline-block;
    font-weight: 600;
    margin: 1rem 0;
}

/* ==================== 
   AdSense Containers
==================== */
.ad-container {
    text-align: center;
    margin: 1rem auto;
    overflow: hidden;
}

.ad-header {
    max-width: 728px;
    min-height: 90px;
}

.ad-sidebar {
    max-width: 300px;
    min-height: 250px;
}

.ad-footer {
    max-width: 728px;
    min-height: 90px;
}

/* ==================== 
   Admin Panel
==================== */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.admin-login-box {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.admin-login-box h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.admin-sidebar {
    min-height: 100vh;
    background: var(--text-dark);
    color: var(--white);
    padding: 1.5rem;
}

.admin-sidebar .logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar .nav-link {
    color: rgba(255,255,255,0.8) !important;
    padding: 0.8rem 1rem !important;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: var(--primary-color);
    color: var(--white) !important;
}

.admin-sidebar .nav-link::after {
    display: none;
}

.admin-content {
    padding: 2rem;
    background: var(--bg-light);
    min-height: 100vh;
}

.stat-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.primary {
    background: rgba(139, 21, 56, 0.1);
    color: var(--primary-color);
}

.stat-icon.success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.stat-icon.warning {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning);
}

.stat-icon.danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.stat-info h3 {
    font-size: 1.8rem;
    margin: 0;
}

.stat-info p {
    color: var(--text-light);
    margin: 0;
}

.admin-table {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-table th {
    background: var(--bg-light);
    font-weight: 600;
    border: none;
    padding: 1rem;
}

.admin-table td {
    padding: 1rem;
    vertical-align: middle;
}

.product-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
}

/* ==================== 
   Responsive
==================== */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .admin-sidebar {
        min-height: auto;
    }
}

@media (max-width: 767px) {
    .top-bar {
        padding: 5px 0; /* Slightly tighter padding for mobile */
    }
    
    .top-bar small {
        font-size: 0.75rem; /* Better fit for smaller screens */
        display: block;    /* Ensures it treats the width properly for centering */
    }
    .hero-section {
        padding: 3rem 0;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-image {
        margin-top: 2rem;
    }
    
    .cart-item {
        flex-wrap: wrap;
    }
    
    .cart-item-price {
        width: 100%;
        text-align: left;
        margin-top: 1rem;
    }
    
    .checkout-progress {
        font-size: 0.75rem;
    }
    
    .progress-step {
        padding: 0 0.5rem;
    }
    
    .ad-container {
        margin: 1rem auto;
    }
    /* 1. Header: Smaller icons to keep them in one line */
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 1rem; /* Smaller menu icon */
    }

    .nav-link i.fa-shopping-cart, 
    .nav-link i.fa-user,
    .nav-link i.fa-heart {
        font-size: 1rem !important; /* Smaller utility icons */
    }

    .logo-text {
        font-size: 1.2rem; /* Ensure logo doesn't push icons to next line */
    }

    /* 2. Shop by Category: 3 per row, icon + name only */
    .category-card {
        padding: 0.5rem !important;
        border: none;
        box-shadow: none;
    }

    .category-card p, 
    .category-card .btn {
        display: none; /* Remove tagline and button */
    }

    .category-card h4 {
        font-size: 0.8rem;
        margin-top: 0.5rem;
        margin-bottom: 0;
    }

    .category-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-bottom: 0.2rem;
    }

    /* Target the column grid for categories */
    #categories-section .col-md-4 {
        width: 33.33% !important; /* Forces 3 items per line */
        float: left;
    }

    /* 3. Featured Products: 7px vertical gaps */
    .product-info {
        padding: 10px 7px !important;
    }

    .product-info > * {
        margin-top: 0 !important;
        margin-bottom: 7px !important; /* Strict 7px gap */
    }

    .product-category {
        font-size: 0.7rem;
    }

    .product-title {
        font-size: 0.85rem;
        min-height: auto;
        line-height: 1.2;
    }

    .product-rating {
        font-size: 0.7rem;
    }

    .product-price {
        gap: 4px;
    }

    .price-current {
        font-size: 0.95rem;
    }

    /* 4. Features Section: 2 Column Grid */
    #features-section .col-md-3 {
        width: 50% !important;
        margin-bottom: 1.5rem;
    }

    #features-section .fa-3x {
        font-size: 2rem !important; /* Slightly smaller icons for 2-col fit */
    }

    #features-section h5 {
        font-size: 0.9rem;
    }
    
    #features-section p {
        font-size: 0.8rem;
    }
}

@media (max-width: 575px) {
    .logo-text {
        font-size: 1.3rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* Product grid - 2 columns on mobile */
    .row.g-4 > [class*="col-"] {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    .row.g-4 {
        --bs-gutter-x: 4px;
    }
    
    /* Product card adjustments for mobile */
    .product-card {
        margin-bottom: 4px;
    }
    
    .product-info {
        padding: 4px 5px 5px 5px;
    }
    
    .product-title {
        font-size: 0.85rem;
        min-height: 2.5rem;
    }
    
    .price-current {
        font-size: 1rem;
    }
    
    .product-actions .btn {
        padding: 0.35rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Product page mobile adjustments */
    .product-details {
        padding: 10px;
    }
    
    .product-details h1 {
        font-size: 1.1rem;
    }
    /* Product page price section */
    /* Add to cart section mobile */
    .product-add-section {
        flex-wrap: nowrap !important;
    }
    
    .product-add-section .add-to-cart {
        font-size: 0.75rem !important;
        white-space: nowrap;
    }
    
    .product-add-section .add-to-cart i {
        margin-right: 0.2rem !important;
    }
    
    .product-add-section .wishlist-btn {
        padding: 0.35rem !important;
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .quantity-selector button,
    .quantity-selector input {
        width: 30px;
        font-size: 0.8rem;
    }
    
    .quantity-selector input {
        width: 36px;
    }
    .section-heading {
        padding-top: 15px;
    }
    /* Container padding for product page - 10px only */
    section.py-5 .container,
    .product-details-section .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    /* Thumbnail gallery mobile */
    .thumbnail-item {
        width: 50px;
        height: 50px;
    }
    
    /* Product gallery mobile */
    .product-gallery {
        padding: 5px;
    }
    
    /* Reduce section padding on mobile */
    section.py-5 {
        padding-top: 0.1rem !important;
        padding-bottom: 2rem !important;
    }
}
/* ==================== 
   Utilities
==================== */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
}

.badge {
    font-weight: 500;
}

.alert {
    border-radius: var(--border-radius);
    border: none;
}

.form-select {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: none;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast i {
    font-size: 1.2rem;
}

.toast.success i {
    color: var(--success);
}

.toast.error i {
    color: var(--danger);
}

/* ==================== 
   Cart Drawer
==================== */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: var(--white);
    z-index: 1050;
    display: none;
    flex-direction: column;
    transition: right 0.3s ease;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
}

.cart-drawer.active {
    display: flex !important;
    right: 0;
}

.cart-drawer-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-light);
}

.cart-drawer-header h5 {
    font-family: var(--font-primary);
    font-weight: 600;
}

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-drawer-footer {
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
    background: var(--bg-light);
}

.cart-drawer-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-drawer-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    position: relative;
}

.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price-qty {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 600;
}

.cart-item-qty {
    color: var(--text-light);
    font-size: 0.85rem;
}

.cart-item-remove {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--danger);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.free-shipping-progress {
    background: var(--white);
    padding: 0.75rem;
    border-radius: var(--border-radius);
}

.cart-drawer-subtotal {
    font-size: 1.1rem;
    padding-top: 0.5rem;
    border-top: 1px solid #dee2e6;
}

/* Prevent body scroll when drawer is open */
body.drawer-open {
    overflow: hidden;
}

/* Hide the zoom pane by default */
/* ==================== 
   Mobile View Fixes (Max-width: 767px)
==================== */
@media (max-width: 767px) {
    
    /* 1. Header: Cart & Menu Alignment */
    .nav-link.cart-link {
        padding: 2px 5px !important; /* Decreased padding */
    }
    .nav-link.cart-link i {
        font-size: 1.1rem !important; /* Smaller icon */
    }
    .navbar-toggler {
        padding: 2px 5px !important;
        font-size: 1rem !important;
    }

    /* 2. Shop by Category: 3 per line & Hide extra info */
    #categories-section .category-card {
        padding: 10px 5px !important;
        box-shadow: none;
        background: transparent;
    }
    
    #categories-section .category-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-bottom: 5px;
    }

    #categories-section .category-card h4 {
        font-size: 0.75rem; /* Smaller text to fit 3 in a row */
        margin: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Hide the description and the button on mobile */
    #categories-section .category-card p, 
    #categories-section .category-card .btn {
        display: none !important;
    }

    /* 3. Featured Products: 7px Strict Gap */
    .product-info {
        padding: 10px 7px !important;
    }

    /* This forces exactly 7px gap between every element in the product card */
    .product-info > * {
        margin-top: 0 !important;
        margin-bottom: 7px !important; 
    }
    
    .product-info > *:last-child {
        margin-bottom: 0 !important;
    }

    .product-title {
        min-height: auto !important;
        font-size: 0.85rem;
    }

    /* 4. Features Section: 2 Column Grid */
    #features-section .col-6 {
        width: 50% !important;
        margin-bottom: 20px;
    }
    
    #features-section i.fa-3x {
        font-size: 2rem !important;
    }
    
    #features-section h5 {
        font-size: 0.9rem;
    }

    /* Ensure link doesn't add blue color or underline */
    .category-link {
        text-decoration: none !important;
        color: inherit !important;
    }
}