:root {
    --ocean-blue: #0066cc;
    --deep-blue: #004080;
    --light-blue: #e6f2ff;
    --teal: #00a6a6;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --dark-gray: #343a40;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --gradient-primary: linear-gradient(135deg, var(--ocean-blue), var(--teal));
    --gradient-secondary: linear-gradient(135deg, var(--deep-blue), var(--ocean-blue));
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.2);
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark-gray);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--white);
    color: white;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.top-bar {
    background-color: var(--deep-blue);
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: #e9ecef;
}

.top-bar-content {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.top-bar-content span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    padding: 0.2rem 0.35rem;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    color: #e9ecef;
    text-decoration: none;
    transition: transform 0.15s ease, background 0.15s ease;
    box-shadow: none;
    border: 1px solid rgba(255,255,255,0.06);
}

.social-link i {
    font-size: 1.05rem;
    line-height: 1;
    pointer-events: none; /* ensure clicks hit anchor */
}

.social-link:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,0.12);
    color: white;
    border-color: rgba(255,255,255,0.16);
}

.social-link:active {
    transform: translateY(0);
    background: rgba(255,255,255,0.16);
}

.social-link:focus {
    outline: 3px solid rgba(0,102,204,0.28);
    outline-offset: 2px;
    background: rgba(255,255,255,0.14);
}

@media (min-width: 769px) {
    .social-link { width: 48px; height: 48px; min-width: 48px; min-height: 48px; }
}

@media (max-width: 480px) {
    .top-bar-content {
        gap: 0.5rem;
        justify-content: space-between;
        align-items: center;
        padding: 0.25rem 0;
    }
    .social-links { gap: 0.5rem; }
    .social-link { width: 44px; height: 44px; }
    .top-bar-content span { display: none; } /* keep top bar compact on tiny screens - contact numbers hidden to favor tappable icons */
}

.main-header {
    background: var(--white);
    padding: 1rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    font-size: 2rem;
    font-weight: 700;
    text-decoration: none;
    color: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo img { height: 42px; width: auto; display: block; }

.logo:hover {
    transform: translateY(-2px);
}

.logo i {
    margin-right: 0.5rem;
    font-size: 2.5rem;
    transition: all 0.3s ease;
}

.logo:hover i {
    transform: rotate(15deg);
    color: rgba(255,255,255,0.9);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--ocean-blue);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav.mobile-open {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
    animation: slideInFromTop 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-link {
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover, .nav-link.active {
    background: rgba(0,102,204,0.1);
    transform: translateY(-2px);
}

.cart-icon {
    position: relative;
    font-size: 1.2rem;
    cursor: pointer;
    /* make perfectly round */
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
    transition: all 0.3s ease;
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-md);
}

.cart-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.cart-icon:active::after {
    width: 40px;
    height: 40px;
    animation: ripple 0.6s ease-out;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.btn-login {
    background: var(--warning);
    color: var(--dark-gray);
    font-weight: 700;
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn-login:hover {
    background: #ffca2c !important; /* Lighter yellow */
    color: var(--dark-gray) !important;
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: var(--shadow-md) !important;
}

/* User Profile and Auth Styles */
.user-menu {
    position: relative;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    min-width: 200px;
    z-index: 1001;
    animation: slideInFromTop 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e9ecef;
}

.profile-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--dark-gray);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.profile-dropdown a:hover {
    background: var(--light-gray);
    color: var(--ocean-blue);
    transform: translateX(5px);
}

.profile-dropdown a i {
    width: 16px;
    color: var(--ocean-blue);
}

.auth-modal {
    max-width: 480px;
    width: 90%;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
    animation: slideInFromLeft 0.3s ease;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: white;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.profile-avatar:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.profile-display {
    animation: fadeInUp 0.4s ease;
}

.profile-display > div {
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.profile-display > div:last-child {
    border-bottom: none;
}

.profile-display > div:hover {
    background: var(--light-gray);
    padding-left: 1rem;
    border-radius: 8px;
}

.orders-list .summary-section {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.orders-list .summary-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,102,204,0.05), transparent);
    transition: left 0.3s ease;
}

.orders-list .summary-section:hover::before {
    left: 100%;
}

.orders-list .summary-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.order-status {
    animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Main Content */
.main {
    margin-top: 133px; /* increased from 121px to avoid header overlapping content */
    min-height: calc(100vh - 121px);
}

/* Hero Section */
.hero {
    background: var(--gradient-secondary);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="60" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="60" cy="40" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: slideInFromLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.2s forwards;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease 0.4s forwards;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    opacity: 0;
    animation: fadeInUp 1s ease 0.6s forwards;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }
    100% {
        background-position: 468px 0;
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* Page Transitions */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.stagger-animation > * {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }
.stagger-animation > *:nth-child(6) { animation-delay: 0.6s; }
.stagger-animation > *:nth-child(7) { animation-delay: 0.7s; }
.stagger-animation > *:nth-child(8) { animation-delay: 0.8s; }

/* Categories Section */
.categories {
    padding: 4rem 0;
    background-color: var(--light-blue);
    background-image: url('/categories_background.png');
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--dark-gray);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.category-card {
    background: white;
    padding: 0;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card-content {
    position: relative;
    z-index: 2;
    padding: 1.25rem;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* pin content to the bottom so background image shows more */
    justify-content: flex-end;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 64, 128, 0.5); /* Semi-transparent deep blue */
    z-index: 1;
    transition: background-color 0.3s ease;
    border-radius: 16px;
}

.category-card:hover::before {
    background-color: rgba(0, 40, 80, 0.7);
}

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

.category-icon {
   display: none;
}

.category-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: white;
    text-align: center;
}

.category-card p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.5rem;
}

.category-card .btn-secondary {
    border-color: white;
    color: white;
}

.category-card .btn-secondary:hover {
    background: white;
    color: var(--ocean-blue);
}

.btn-secondary {
    background: transparent;
    color: var(--ocean-blue);
    border: 2px solid var(--ocean-blue);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--ocean-blue);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn-secondary:hover::before {
    left: 0;
}

.btn-secondary:hover {
    background: var(--ocean-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Products Grid */
.products {
    padding: 4rem 0;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-bar {
    display: flex;
    gap: 1rem;
    flex: 1;
    max-width: 700px;
}

.search-input {
    flex: 1;
    padding: 1.1rem 1.25rem;
    border: 2px solid #e9ecef;
    border-radius: 30px;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    max-width: 100%;
    min-width: 240px;
}

.search-input:focus {
    outline: none;
    border-color: var(--ocean-blue);
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
    animation: pulse 0.3s ease;
}

.category-filter {
    padding: 0.75rem 0.9rem;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    min-width: 140px;
    flex: 0 0 auto;
    max-width: 40%;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* New wrapper to show product name beneath the card */
.product-card-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    text-align: center;
}

/* Product name shown below each card */
.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-gray);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 0.5rem;
    transition: color 0.2s ease;
}

/* Subtle hover color change when hovering the card */
.product-card-wrap:hover .product-name {
    color: var(--ocean-blue);
}

/* Ensure product-card stays full width inside wrapper */
.product-card {
    width: 100%;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.32s ease, box-shadow 0.32s ease;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    min-height: 340px; /* fixed card height for consistent grid layout */
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.35));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.product-card:hover::before {
    opacity: 1;
}

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

.product-card::after {
    content: 'View Details';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 102, 204, 0.9);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
}

.product-card:hover::after {
    opacity: 1;
}

/* Ensure uploaded images fill their containers and keep aspect ratio */
.product-image {
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* square image */
    background: var(--light-blue);
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
}

.product-image img,
.product-image i {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; /* changed from cover -> show whole image inside card */
    opacity: 0.85; /* match hover opacity so images appear at the same visual weight normally */
}

.main-image img,
.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* show the whole image on product details */
    display: block;
    border-radius: 6px;
}

/* Keep icon fallback centered when no image */
.product-image i,
.main-image i,
.thumbnail i {
    font-size: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Product card adjustments to ensure even footers across grid */
.product-card {
    width: 100%;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.32s ease, box-shadow 0.32s ease;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    min-height: 340px; /* fixed card height for consistent grid layout */
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
}

/* Make image area take its natural space and content stretch below */
.product-image {
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* square image */
    background: var(--light-blue);
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
    flex: 0 0 auto; /* image won't stretch; keeps card layout stable */
}

/* Ensure the info area acts as the footer and is always at the bottom */
.product-info {
    padding: 1rem;
    position: relative;
    z-index: 2;
    margin: 0;
    border-radius: 0 0 12px 12px;
    background: white;
    opacity: 1; /* always visible */
    transform: translateY(0);
    pointer-events: auto;
    transition: all 0.28s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto; /* PUSH footer to bottom so all card footers align */
}

/* Keep product-name below the card and aligned */
.product-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark-gray);
    padding: 0.5rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.2s ease;
    align-self: stretch;
    margin-top: 6px;
}

/* Ensure product-info and name take up consistent vertical space when needed */
.product-card-wrap {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    text-align: center;
    height: 100%; /* ensure wrapper stretches to card height */
}

.product-card-wrap .product-card {
    flex: 1 1 auto;
}

.product-name {
    flex: 0 0 auto;
}

/* Inline variant select styling */
.variant-select.inline-variant {
    padding: 0.55rem 1rem;
    border: 1px solid #e6eef9;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff, #f7fbff);
    box-shadow: 0 6px 18px rgba(2,24,71,0.06);
    font-weight: 600;
    color: var(--dark-gray);
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, var(--ocean-blue) 50%), linear-gradient(135deg, var(--ocean-blue) 50%, transparent 50%), linear-gradient(#fff, #fff);
    background-position: calc(100% - 18px) calc(1em + 2px), calc(100% - 13px) calc(1em + 2px), 100% 0;
    background-size: 6px 6px, 6px 6px, 2.5rem 2.5rem;
    background-repeat: no-repeat;
    cursor: pointer;
}

/* Ensure inline layout is responsive */
.product-title-row { width: 100%; gap: 0.5rem; }
@media (max-width: 768px) {
    .variant-select.inline-variant { min-width: 110px; max-width: 45%; font-size: 0.85rem; }
    .product-title { font-size: 1rem; }
}
@media (max-width: 480px) {
    .product-title-row { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .variant-select.inline-variant { width: 100%; max-width: 100%; min-width: auto; }
}

/* Responsive adjustments to keep cards tidy */
@media (max-width: 768px) {
    .product-card { min-height: 300px; }
    .product-price { font-size: 1rem; }
    .product-title { font-size: 1rem; }
}

/* Shopping Cart */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* stronger backdrop for popups */
    background: rgba(0,0,0,0.75);
    z-index: 2000;
    display: flex; /* center modal */
    align-items: center;
    justify-content: center;
    padding: 20px; /* provide breathing room on small screens */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
    overflow: auto; /* allow internal scrolling for long checkout content */
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-modal {
    background: white;
    border-radius: 0;
    width: 100%;
    height: 100vh;
    margin: 0;
    align-self: stretch;
    overflow-y: auto;
    transform: none;
    transition: none;
    animation: none;
}

.cart-modal.auth-modal {
    position: relative;
    transform: none;
    width: 480px;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: auto;
    z-index: 2100;
}

.cart-overlay.active .cart-modal.auth-modal {
    /* ensure centered when active */
    position: relative;
    transform: none;
    width: 480px;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: auto;
    z-index: 2100;
}

.cart-modal.checkout-mode {
    width: 100%;
    height: 100vh;
}

.cart-overlay.active .cart-modal {
    transform: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2001;
}

.cart-header {
    padding: 2rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-content {
    padding: 2rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.3s ease;
    animation: slideInFromLeft 0.3s ease;
}

.cart-item:hover {
    background: var(--light-gray);
    transform: translateX(5px);
}

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

.cart-item-info h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-info p {
    color: var(--medium-gray);
    font-size: 0.9rem;
}

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

.qty-btn {
    background: var(--light-gray);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.qty-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.qty-btn:active::before {
    width: 60px;
    height: 60px;
    animation: ripple 0.4s ease-out;
}

.cart-total {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid #e9ecef;
}

.total-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ocean-blue);
    margin-bottom: 1rem;
}

.btn-checkout {
    width: 100%;
    background: var(--success);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-checkout::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-checkout:hover::before {
    left: 100%;
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.empty-cart {
    text-align: center;
    padding: 3rem;
    color: var(--medium-gray);
}

/* Checkout */
.cart-header-content {
    flex: 1;
}

.checkout-steps {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    justify-content: center;
}

.checkout-steps .step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
    transition: all 0.3s ease;
    position: relative;
}

.checkout-steps .step::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 100%;
    width: 2rem;
    height: 2px;
    background: #dee2e6;
    z-index: -1;
}

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

.checkout-steps .step.active {
    opacity: 1;
    color: var(--ocean-blue);
}

.checkout-steps .step.completed {
    opacity: 1;
    color: var(--success);
}

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

.checkout-steps .step i {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.checkout-steps .step.active i {
    background: var(--ocean-blue);
    color: white;
}

.checkout-steps .step.completed i {
    background: var(--success);
    color: white;
}

.checkout-steps .step span {
    font-size: 0.8rem;
    font-weight: 500;
}

.checkout-step {
    padding: 0;
    animation: fadeInUp 0.4s ease;
}

.step-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.step-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-gray);
}

.step-header p {
    color: var(--medium-gray);
}

.checkout-form {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
    width: 100%;
    box-sizing: border-box;
    gap: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--ocean-blue);
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
}

.payment-methods {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.payment-method::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,102,204,0.1), transparent);
    transition: left 0.3s ease;
}

.payment-method:hover::before {
    left: 100%;
}

.payment-method:hover {
    border-color: var(--ocean-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.payment-method.selected {
    border-color: var(--ocean-blue);
    background: rgba(0,102,204,0.05);
}

.payment-icon {
    width: 50px;
    height: 50px;
    background: var(--light-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ocean-blue);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.payment-info {
    flex: 1;
}

.payment-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--dark-gray);
}

.payment-info p {
    color: var(--medium-gray);
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.payment-info small {
    color: var(--medium-gray);
    font-size: 0.8rem;
}

.payment-radio {
    color: var(--ocean-blue);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.order-summary {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.summary-section {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
}

.summary-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

.summary-section h4 i {
    color: var(--ocean-blue);
}

.summary-items {
    display: grid;
    gap: 1rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 8px;
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.item-name {
    font-weight: 500;
    color: var(--dark-gray);
}

.item-quantity {
    font-size: 0.8rem;
    color: var(--medium-gray);
}

.item-price {
    font-weight: 600;
    color: var(--ocean-blue);
}

.address-info p {
    margin-bottom: 0.25rem;
    color: var(--dark-gray);
    line-height: 1.4;
}

.payment-info p {
    margin-bottom: 0.5rem;
    color: var(--dark-gray);
}

.order-totals {
    background: var(--light-blue) !important;
    border-color: var(--ocean-blue) !important;
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

.total-line:last-child {
    border-bottom: none;
}

.total-final {
    border-top: 2px solid var(--ocean-blue);
    padding-top: 1rem;
    margin-top: 1rem;
    font-size: 1.2rem;
}

.checkout-actions {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.checkout-actions button {
    flex: 1;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.checkout-actions .btn-secondary {
    background: transparent;
    color: var(--medium-gray);
    border: 2px solid #e9ecef;
}

.checkout-actions .btn-secondary:hover {
    border-color: var(--medium-gray);
    color: var(--dark-gray);
}

.checkout-actions .btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.checkout-actions .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.checkout-actions .btn-primary:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-place-order {
    background: var(--success) !important;
    background-image: none !important;
}

.btn-place-order:hover {
    background: #218838 !important;
}

.total-breakdown {
    margin-bottom: 1rem;
}

.total-breakdown .total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--medium-gray);
}

.free-shipping-notice {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--success);
    font-size: 0.8rem;
    font-weight: 500;
    margin: 0.5rem 0;
    animation: slideInFromLeft 0.5s ease;
}

.free-shipping-notice i {
    font-size: 1rem;
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    margin: 2rem 0;
    box-shadow: var(--shadow-lg);
}

.carousel-wrapper {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    position: relative;
    background: var(--gradient-secondary);
    color: white;
    padding: 3rem 1.5rem; /* reduced padding for a more compact slide */
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 280px; /* smaller height to show more content on the page */
}

.carousel-slide.featured-product {
    background: linear-gradient(135deg, var(--ocean-blue), var(--teal), var(--deep-blue));
}

.carousel-slide.company-info {
    background: linear-gradient(135deg, var(--deep-blue), var(--ocean-blue));
}

.carousel-slide.training-promo {
    background: linear-gradient(135deg, var(--teal), var(--ocean-blue));
}

.carousel-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="80" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="60" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="60" cy="40" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s infinite ease-in-out;
    pointer-events: none;
}

.carousel-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.carousel-slide h2 {
    font-size: 2rem; /* reduced from 3rem */
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.carousel-slide .slide-icon {
    font-size: 2.5rem; /* reduced from 4rem */
    margin-bottom: 1rem;
    opacity: 0.9;
    animation: bounceIn 1s ease 0.2s both;
}

.carousel-slide p {
    font-size: 1rem; /* reduced from 1.3rem */
    margin-bottom: 1.25rem;
    opacity: 0.95;
    line-height: 1.4;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.carousel-slide .btn-primary {
    animation: fadeInUp 0.8s ease 0.5s both;
    transform: translateY(20px);
}

.carousel-controls {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.carousel-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.carousel-dot:hover::before {
    width: 16px;
    height: 16px;
}

.carousel-dot.active {
    background: white;
    transform: scale(1.2);
}

.carousel-arrows {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 10;
}

.carousel-arrows:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 2rem;
}

.carousel-next {
    right: 2rem;
}

.carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: var(--ocean-blue);
    transition: width 0.1s ease;
    z-index: 10;
}

/* Carousel responsive design */
@media (max-width: 768px) {
    .carousel-slide {
        padding: 3rem 1.5rem;
        min-height: 350px;
    }
    
    .carousel-slide h2 {
        font-size: 2.2rem;
    }
    
    .carousel-slide p {
        font-size: 1.1rem;
    }
    
    .carousel-slide .slide-icon {
        font-size: 3rem;
    }
    
    .carousel-arrows {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .carousel-prev {
        left: 1rem;
    }
    
    .carousel-next {
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .carousel-slide {
        padding: 2rem 1rem;
        min-height: 300px;
    }
    
    .carousel-slide h2 {
        font-size: 1.8rem;
    }
    
    .carousel-slide p {
        font-size: 1rem;
    }
    
    .carousel-controls {
        bottom: 1rem;
    }
    
    .carousel-arrows {
        display: none;
    }
}

/* FAQ Section */
.faq-section {
    padding: 4rem 0;
    background: var(--light-gray);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.faq-item {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
}

.faq-item.open {
    box-shadow: var(--shadow-lg);
}

.faq-question {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--dark-gray);
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: var(--light-blue);
}

.faq-question i {
    color: var(--ocean-blue);
    transition: transform 0.3s ease;
}

.faq-item.open .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
    color: var(--medium-gray);
}

.faq-item.open .faq-answer {
    max-height: 200px; /* Adjust as needed */
    transition: max-height 0.6s cubic-bezier(1, 0, 1, 0);
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    line-height: 1.7;
}

/* Footer */
.footer {
    background: var(--dark-gray);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--teal);
}

.footer-section p,
.footer-section a {
    color: #adb5bd;
    text-decoration: none;
    margin-bottom: 0.5rem;
    display: block;
}

.footer-section a:hover {
    color: var(--teal);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #495057;
    color: #adb5bd;
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--ocean-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite, pulse 2s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Product Details Page */
.product-details {
    padding: 2rem 0;
    min-height: 80vh;
    animation: fadeInUp 0.6s ease;
}

.product-details-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: slideInFromLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-image {
    width: 100%;
    aspect-ratio: 4 / 4; /* make it sqaure */
    max-height: 420px;   /* cap height to avoid huge images */
    max-width: 420px;
    height: auto;
    background: var(--light-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--ocean-blue);
    border: 2px solid #e9ecef;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-image:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.main-image i {
    transition: all 0.3s ease;
}

.main-image:hover i {
    transform: scale(1.05) rotate(5deg);
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.thumbnail {
    width: 100%;
    aspect-ratio: 1 / 1; /* square thumbnails */
    background: var(--light-gray);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ocean-blue);
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,102,204,0.3), transparent);
    transition: left 0.3s ease;
}

.thumbnail:hover::before {
    left: 100%;
}

.thumbnail:hover {
    transform: translateY(-2px);
}

.thumbnail.active {
    border-color: var(--ocean-blue);
}

.product-info-detailed {
    animation: slideInFromRight 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-title-detailed {
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    font-size: 1.8rem; /* reduced for nicer fit */
    animation: slideInFromRight 0.6s ease 0.2s both;
}

.product-category-detailed {
    color: var(--medium-gray);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Brief description under product title */
.product-brief {
    color: var(--dark-gray);
    font-size: 1rem; /* slightly smaller and consistent */
    margin-bottom: 1rem;
    line-height: 1.45;
}

/* Slightly reduce long description and specs for better balance */
.product-description-detailed {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
    animation: slideInFromRight 0.6s ease 0.6s both;
}

.product-specs {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.specs-title {
    font-size: 1.05rem; /* reduced header size */
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--dark-gray);
}

.specs-list {
    list-style: none;
    padding: 0;
}

.specs-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

.specs-list li:last-child {
    border-bottom: none;
}

.spec-label {
    font-weight: 500;
    color: var(--dark-gray);
}

.spec-value {
    color: var(--medium-gray);
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quantity-label {
    font-weight: 600;
    color: var(--dark-gray);
}

.quantity-controls {
    display: flex;
    align-items: center;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    overflow: hidden;
}

.qty-btn-large {
    background: var(--light-gray);
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.qty-btn-large::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.qty-btn-large:active::before {
    width: 80px;
    height: 80px;
    animation: ripple 0.5s ease-out;
}

.add-to-cart-detailed {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.btn-add-large {
    flex: 1;
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-add-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.btn-add-large:hover::before {
    left: 100%;
}

.btn-add-large i {
    transition: transform 0.3s ease;
}

.btn-add-large:hover i {
    transform: scale(1.2) rotate(10deg);
}

.btn-wishlist {
    background: transparent;
    border: 2px solid var(--ocean-blue);
    color: var(--ocean-blue);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    position: relative;
    overflow: hidden;
}

.btn-wishlist::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--ocean-blue);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
    z-index: -1;
}

.btn-wishlist:hover::before {
    width: 100px;
    height: 100px;
}

.btn-wishlist i {
    transition: all 0.3s ease;
}

.btn-wishlist:hover i {
    transform: scale(1.2);
    animation: pulse 0.6s ease;
}

.back-to-products {
    background: transparent;
    border: none;
    color: var(--ocean-blue);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.back-to-products::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--ocean-blue);
    transition: width 0.3s ease;
}

.back-to-products:hover::before {
    width: 100%;
}

.back-to-products i {
    transition: transform 0.3s ease;
}

.back-to-products:hover i {
    transform: translateX(-5px);
}

.product-tabs {
    margin-top: 3rem;
}

.tab-buttons {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin-bottom: 2rem;
}

.tab-button {
    background: none;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--medium-gray);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button::before {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--ocean-blue);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.tab-button:hover::before {
    width: 100%;
}

.tab-button.active::before {
    width: 100%;
}

.tab-content {
    padding: 1rem 0;
    animation: fadeInUp 0.4s ease;
}

.review-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--ocean-blue);
    transition: all 0.3s ease;
    animation: slideInFromLeft 0.5s ease;
}

.review-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.review-card:nth-child(even) {
    animation: slideInFromRight 0.5s ease;
}

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

.review-author {
    font-weight: 600;
    color: var(--dark-gray);
}

.review-date {
    color: var(--medium-gray);
    font-size: 0.9rem;
}

.review-rating {
    color: #ffc107;
    margin-bottom: 0.5rem;
}

.review-text {
    color: var(--dark-gray);
    line-height: 1.6;
}

/* Enhanced Button Animations */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    animation: pulse 0.2s ease;
}

/* Page Load Animation */
.app-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeOut 1s ease 2s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.app-loading .logo {
    font-size: 4rem;
    color: white;
    animation: bounceIn 1s ease;
}

/* Scroll-triggered animations */
.animate-on-scroll {
    opacity: 1;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced form animations */
input:focus, select:focus {
    animation: pulse 0.3s ease;
}

/* Micro-interactions */
*[data-animate="hover"] {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*[data-animate="hover"]:hover {
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav {
        display: none;
    }
    
    .nav.mobile-open {
        display: flex;
    }
    
    .products-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }
    
    .search-bar {
        flex-direction: column;
        max-width: none;
        gap: 1rem;
    }

    .search-input,
    .category-filter {
        width: 100%;
        padding: 0.95rem 1rem;
        font-size: 1rem;
        border-radius: 12px;
        max-width: 100%;
    }
    
    .product-details-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .product-title-detailed {
        font-size: 2rem;
    }
    
    .product-price-detailed {
        font-size: 2rem;
    }
    
    .main-image {
        max-height: 260px; /* reduce mobile main image height */
        height: auto;
        font-size: 2.6rem;
    }
    
    .add-to-cart-detailed {
        flex-direction: column;
    }
    
    .btn-wishlist {
        width: 100%;
        border-radius: 25px;
    }
    
    .tab-buttons {
        flex-wrap: wrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .tab-buttons::-webkit-scrollbar {
        display: none;
    }
    
    .tab-button {
        flex: none;
        min-width: 120px;
        padding: 0.8rem 1.2rem;
        font-size: 0.95rem;
        white-space: nowrap;
        margin-bottom: 0.5rem;
    }
    
    .tab-content {
        padding: 1.5rem 0;
    }
    
    .qty-btn-large {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .quantity-input {
        width: 80px;
        text-align: center;
        padding: 1rem 0.5rem;
        font-size: 1.1rem;
        border: none;
        background: transparent;
        font-weight: 600;
    }
    
    .btn-add-large {
        padding: 1.2rem 2rem;
        font-size: 1.1rem;
    }
    
    .profile-dropdown {
        position: fixed;
        top: 80px;
        right: 20px;
        left: 20px;
        width: auto;
        min-width: auto;
    }
    
    .user-profile-btn {
        justify-content: center;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    
    .order-header > div:last-child {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .profile-display .form-row {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    /* Make admin category list items stack and increase tap targets */
    .summary-section {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }
    .summary-section .btn-secondary { padding: 0.5rem 0.75rem; font-size: 0.95rem; }
    .summary-section > div:first-child { width: 100%; }
    .summary-section > div:last-child { width: 100%; display:flex; justify-content: flex-start; gap:0.5rem; flex-wrap:wrap; }
    /* Make the create/edit form full width and inputs larger on mobile */
    .summary-section form, .summary-section .form-group { width: 100%; }
    .summary-section .form-row { grid-template-columns: 1fr !important; }

    /* Responsive adjustments for admin categories action buttons */
    .admin-cat-actions { display: flex; gap: 0.5rem; align-items: center; }

    /* Make the action buttons stack and enlarge hit areas */
    .admin-cat-actions { flex-direction: column; align-items: stretch; gap: 0.75rem; width: 100%; }
    .admin-cat-actions .btn-secondary,
    .admin-cat-actions .btn-primary {
        width: 100%;
        padding: 0.95rem 1rem;
        font-size: 1rem;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .categories,
    .products {
        padding: 2rem 0;
    }
    
    .cart-modal {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .search-input,
    .category-filter {
        padding: 1.5rem;
        font-size: 1.2rem;
        border-width: 3px;
    }
    
    .product-specs {
        padding: 1.2rem;
    }
    
    .specs-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 1rem 0;
    }
    
    .spec-label {
        font-size: 0.95rem;
    }
    
    .spec-value {
        font-size: 1rem;
        font-weight: 500;
    }
    
    .tab-buttons {
        gap: 0.5rem;
    }
    
    .tab-button {
        padding: 1rem 1rem;
        font-size: 0.9rem;
        border-radius: 8px;
        background: var(--light-gray);
    }
    
    .tab-button.active {
        background: var(--ocean-blue);
        color: white;
    }
    
    .tab-button::before {
        display: none;
    }
    
    .review-card {
        padding: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .auth-modal {
        width: 100%;
        max-width: 540px;
        max-height: 90vh;
        border-radius: 12px;
        margin: 0 auto;
    }
    
    /* keep dropdown behavior unchanged */
    
    .order-status {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .item-price {
        align-self: flex-end;
        font-size: 1.1rem;
    }
    
    .checkout-steps {
        gap: 0.5rem;
    }
    
    .checkout-steps .step i {
        width: 25px;
        height: 25px;
        font-size: 0.8rem;
    }
}

/* Responsive form improvements for mobile devices */
.checkout-form,
.auth-modal .checkout-form,
.summary-section .checkout-form,
.cart-modal .checkout-form {
    width: 100%;
    box-sizing: border-box;
    gap: 1rem;
}

/* Make form rows collapse to single column on small screens */
.form-row {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr !important;
    }
}

/* Increase hit area of inputs and buttons for touch */
.form-group input,
.form-group select,
.form-group textarea,
.search-input,
.category-filter {
    padding: 0.9rem 1rem;
    font-size: 1rem;
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure modals and auth forms are full-width and scrollable on mobile */
.auth-modal,
.cart-modal {
    max-width: 540px;
    width: 96%;
}
@media (max-width: 480px) {
    .auth-modal,
    .cart-modal {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 8px;
        overflow-y: auto;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 1rem;
        font-size: 1.05rem;
    }

    .checkout-actions {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    .checkout-actions button {
        width: 100%;
    }
}

.admin-add-product {
    max-width: 900px; /* desktop */
    padding: 1.25rem;
    box-sizing: border-box;
    border-radius: 12px;
}

/* Mobile: make add-product form edge-to-edge and ensure modals fill screen */
@media (max-width: 768px) {
    .admin-add-product {
        max-width: 100%;
        padding: 1rem;
        border-radius: 0;
        margin: 0;
        width: 100%;
    }

    /* When Add Product is shown as modal via .cart-overlay/.cart-modal ensure full-screen feel */
    .cart-overlay.active .cart-modal {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
        margin-top: 0;
        align-self: stretch;
    }

    .cart-modal .cart-content,
    .cart-modal .checkout-form {
        padding: 1rem;
        overflow-y: auto;
        max-height: calc(100vh - 120px);
    }

    /* Improve input hit areas on mobile inside admin form */
    .admin-add-product .form-group input,
    .admin-add-product .form-group select,
    .admin-add-product .form-group textarea,
    .admin-add-product .search-input {
        padding: 1rem;
        font-size: 1rem;
    }
}

/* Products Grid - Mobile Responsive */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .product-card {
        min-height: 300px;
        border-radius: 12px;
        background-position: center;
    }
    .product-info {
        margin: 0.5rem;
        padding: 0.9rem;
        border-radius: 10px;
    }
}

/* Products Grid - Mobile Responsive */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    .product-card {
        min-height: 220px;
        background-size: cover;
        display: flex;
        align-items: flex-end;
        justify-content: flex-start;
    }
    .product-info {
        width: 100%;
        background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.95));
        padding: 0.75rem;
        margin: 0;
        border-radius: 0;
    }
    .product-price { font-size: 1.1rem; }
    .btn-add-to-cart { padding: 0.65rem; font-size: 0.95rem; }
}

/* Footer responsive adjustments */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    
    .footer-section p,
    .footer-section a {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .footer-bottom {
        padding: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .footer-section h3 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }
    
    .footer-section p,
    .footer-section a {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }
    
    .footer-bottom {
        padding: 1.2rem 0;
    }
}

/* Replace existing .variant-row block with a more robust, responsive grid + input sizing */
.variant-row {
    display: grid;
    grid-template-columns: 1fr 120px 120px 120px 1fr;
    gap: 0.6rem;
    align-items: center;
    width: 100%;
    column-gap: 0.6rem;
}

/* Make sure individual controls expand to fill the grid cell and have consistent padding */
.variant-row input,
.variant-row select,
.variant-row textarea,
.variant-row .variant-full,
.variant-row .variant-compact {
    width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    font-weight: 600;
    color: var(--dark-gray);
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

/* Ensure the "variant-full" cell spans full width where intended */
.variant-row .variant-full {
    grid-column: span 1;
}

/* Compact controls get a consistent minimum width on larger screens */
.variant-row .variant-compact {
    min-width: 90px;
}

/* Action buttons area: keep buttons grouped and aligned */
.variant-row > .variant-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    align-items: center;
}

/* Hover / focus styles for inputs */
.variant-row input:focus,
.variant-row select:focus,
.variant-row textarea:focus {
    outline: none;
    border-color: var(--ocean-blue);
    box-shadow: 0 6px 18px rgba(2,24,71,0.06);
}

/* Desktop: arrange into two logical columns when space allows */
@media (min-width: 901px) {
    .variant-row {
        grid-template-columns: 1fr 420px; /* left: name, right: compact controls */
        grid-template-rows: auto;
        align-items: center;
    }
    .variant-row .variant-main { grid-column: 1 / 2; display:block; }
    .variant-row .variant-controls { grid-column: 2 / 3; display:flex; gap:0.5rem; align-items:center; }
    .variant-row .variant-controls > * { width: auto; }
    .variant-row > .variant-actions { justify-content: flex-end; }
}

/* Tablet / smaller screens: collapse second row to stacked layout for touch */
@media (max-width: 900px) {
    .variant-row {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        gap: 0.5rem;
    }
    .variant-row .variant-main { grid-column: 1 / -1; }
    .variant-row .variant-controls { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
    .variant-row .variant-compact { min-width: 0; }
    .variant-row .variant-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Mobile: single column stack */
@media (max-width: 480px) {
    .variant-row .variant-controls { grid-template-columns: 1fr; }
    .variant-row .variant-controls > * { width: 100%; }
    .variant-row .variant-actions { flex-direction: column; align-items: stretch; gap: 0.5rem; }
}