/*
|--------------------------------------------------------------------------
| Empapy Caffe - Premium Coffee E-commerce Theme
|--------------------------------------------------------------------------
| A luxurious Arabic RTL theme with coffee-inspired aesthetics
| Glassmorphism, smooth animations, and golden accents
*/

/* ========================================
   CSS Variables - Coffee Color Palette
   ======================================== */
:root {
    /* Primary Colors - Coffee Tones */
    --espresso: #2C1810;
    --dark-roast: #3D2317;
    --medium-roast: #5D3A1F;
    --light-roast: #8B5A2B;

    /* Accent Colors */
    --gold: #C9A227;
    --gold-light: #E8C547;
    --gold-dark: #A88B1F;
    --cream: #FFF8E7;
    --cream-dark: #F5E6C8;

    /* Neutral Colors */
    --white: #FFFFFF;
    --off-white: #FAFAFA;
    --gray-100: #F5F5F5;
    --gray-200: #E5E5E5;
    --gray-300: #D4D4D4;
    --gray-400: #A3A3A3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;

    /* Functional Colors */
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;

    /* Gradients */
    --gradient-gold: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
    --gradient-dark: linear-gradient(135deg, var(--espresso) 0%, var(--dark-roast) 100%);
    --gradient-hero: linear-gradient(135deg, rgba(44, 24, 16, 0.95) 0%, rgba(61, 35, 23, 0.9) 100%);

    /* Z-Index Scale - Single Source of Truth */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-overlay: 5000;
    --z-modal: 9000;
    --z-modal-backdrop: 8999;
    --z-toast: 9500;
    --z-tooltip: 9999;
    --z-max: 99999;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 16px 60px rgba(0, 0, 0, 0.2);
    --shadow-gold: 0 4px 20px rgba(201, 162, 39, 0.3);

    /* Typography */
    --font-primary: 'Cairo', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --radius-full: 9999px;

    /* Fixed header offset for anchor scrolling */
    --sticky-offset: 120px;
}

/* ========================================
   Base Styles
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    /* scroll-behavior: smooth - Removed as it causes scroll issues on mobile touch devices */
    /* For smooth anchor scrolling on desktop, use JS-based smooth scroll instead */
    overflow-x: hidden;
    max-width: 100%;
    scroll-padding-top: var(--sticky-offset);
    height: auto;
    overflow-y: auto;
}

/* Enable smooth scroll only for non-touch devices */
@media (hover: hover) and (pointer: fine) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    font-family: var(--font-primary);
    background-color: var(--cream);
    color: var(--espresso);
    line-height: 1.7;
    overflow-x: hidden;
    overflow-y: auto;
    max-width: 100%;
    position: relative;
    /* Fix mobile scroll issues */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: auto;
    height: auto;
}

/* Ensure normal page scroll (avoid internal scroll traps) */
section,
.container,
.row,
[data-aos] {
    touch-action: auto;
}

section {
    overflow: visible !important;
    max-height: none !important;
}

/* Prevent headings/anchors from being hidden behind fixed bars */
section,
[id] {
    scroll-margin-top: var(--sticky-offset);
}

body.announcement-hidden {
    --sticky-offset: 80px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--espresso);
}

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

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

/* Selection */
::selection {
    background-color: var(--gold);
    color: var(--white);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

/* Hide scrollbars on touch devices (mobile/tablet) */
@media (pointer: coarse) {
    ::-webkit-scrollbar {
        display: none;
    }

    * {
        scrollbar-width: none;
    }
}

::-webkit-scrollbar-track {
    background: var(--cream);
}

::-webkit-scrollbar-thumb {
    background: var(--light-roast);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--medium-roast);
}

/* 
 * Scrollbar visibility - REMOVED global hiding per UX audit
 * Scrollbars now visible for better discoverability
 * Only hide on specific decorative elements below 
 */

/* Hide scrollbars only on horizontal scroll containers and galleries */
.gallery-thumbnails,
.horizontal-scroll-container,
.categories-scroll {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gallery-thumbnails::-webkit-scrollbar,
.horizontal-scroll-container::-webkit-scrollbar,
.categories-scroll::-webkit-scrollbar {
    display: none;
}

/* ========================================
   Utility Classes
   ======================================== */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.glass-dark {
    background: rgba(44, 24, 16, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-golden {
    background: var(--gradient-gold);
    border: none;
    color: var(--espresso);
    font-weight: 600;
    padding: 12px 30px;
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-gold);
}

.btn-golden:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(201, 162, 39, 0.4);
    color: var(--espresso);
}

.btn-golden:active {
    transform: translateY(-1px);
}

.btn-outline-golden {
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
    font-weight: 600;
    padding: 10px 28px;
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
}

.btn-outline-golden:hover {
    background: var(--gold);
    color: var(--espresso);
}

.btn-icon {
    width: 48px;
    height: 48px;
    min-width: 48px; /* Ensure minimum touch target */
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: inherit;
    transition: all var(--transition-normal);
}

.btn-icon:hover {
    background: var(--gold);
    color: var(--espresso);
    transform: scale(1.1);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
}

.section-title p {
    color: var(--gray-500);
    font-size: 1.1rem;
}

/* ========================================
   Navbar Styles
   ======================================== */
.navbar-main {
    padding: 20px 0;
    transition: all var(--transition-normal);
    background: transparent;
}

.navbar-main.scrolled {
    background: rgba(44, 24, 16, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 0;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

/* Smart hide on scroll down - only on larger screens */
.navbar-main.navbar-hidden {
    transform: translateY(-100%);
}

/* Disable navbar hiding on mobile - can cause issues */
@media (max-width: 768px) {
    .navbar-main.navbar-hidden {
        transform: none;
        /* Don't hide navbar on mobile */
    }

    .navbar-main.scrolled {
        transition-duration: 0.2s;
    }
}

.navbar-main .navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    font-weight: 800;
    font-size: 1.5rem;
}

.navbar-main .brand-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
    color: var(--espresso);
    font-size: 1.5rem;
}

.navbar-main .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    padding: 10px 20px !important;
    position: relative;
    transition: all var(--transition-normal);
}

.navbar-main .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 20px;
    width: 0;
    height: 3px;
    background: var(--gold);
    border-radius: var(--radius-full);
    transition: width var(--transition-normal);
}

.navbar-main .nav-link:hover,
.navbar-main .nav-link.active {
    color: var(--gold);
}

.navbar-main .nav-link:hover::after,
.navbar-main .nav-link.active::after {
    width: calc(100% - 40px);
}

.navbar-actions {
    color: var(--white);
}

.cart-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gold);
    color: var(--espresso);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    transition: transform var(--transition-fast);
}

.cart-badge.bounce {
    animation: bounce 0.5s ease;
}

@keyframes bounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }
}

/* Mobile Navbar */
.navbar-toggler {
    border: none;
    padding: 10px;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--gradient-dark);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg video,
.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    color: var(--white);
    padding-top: 100px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(201, 162, 39, 0.2);
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 10px 25px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 25px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 25px;
    color: var(--white);
}

.hero-title span {
    color: var(--gold);
}

.hero-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 500px;
}

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

.hero-stats {
    display: flex;
    gap: 50px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gold);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

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

.hero-image img {
    width: 100%;
    max-width: 600px;
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.4));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Floating Coffee Beans */
.floating-beans {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    overflow: hidden;
}

.bean {
    position: absolute;
    font-size: 2rem;
    color: rgba(201, 162, 39, 0.3);
    animation: floatBeans 15s linear infinite;
}

@keyframes floatBeans {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ========================================
   Product Card Styles
   ======================================== */
.product-card {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
    height: 100%;
}

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

.product-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--cream);
}

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

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

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
}

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

.product-badge.featured {
    background: var(--gold);
    color: var(--espresso);
    top: auto;
    bottom: 15px;
}

.product-actions {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    gap: 10px;
    opacity: 0;
    transition: all var(--transition-normal);
    z-index: 3;
}

.product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.btn-action {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: none;
    border-radius: var(--radius-full);
    color: var(--espresso);
    font-size: 1.2rem;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

.btn-action:hover {
    background: var(--gold);
    color: var(--espresso);
    transform: scale(1.1);
}

.product-content {
    padding: 25px;
}

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

.product-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin: 10px 0;
    line-height: 1.4;
}

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

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.meta-item {
    font-size: 0.85rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    gap: 5px;
}

.meta-item i {
    color: var(--light-roast);
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.price-current {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--espresso);
}

.price-old {
    font-size: 0.85rem;
    color: var(--gray-400);
    text-decoration: line-through;
}

/* Discount Price - Smaller font for consistency */
.product-price.has-discount {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.product-price.has-discount .price-current {
    font-size: 1.1rem;
}

.product-price.has-discount .price-old {
    font-size: 0.8rem;
    order: -1;
}

/* ========================================
   Categories Section
   ======================================== */
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    aspect-ratio: 4/3;
    max-height: 220px;
    transition: all var(--transition-normal);
}

.category-card:hover {
    transform: scale(1.03);
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(44, 24, 16, 0.9) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    color: var(--white);
}

.category-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.category-count {
    font-size: 0.9rem;
    color: var(--gold);
}

/* ========================================
   Cart Drawer
   ======================================== */
.cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: all var(--transition-normal);
}

.cart-drawer.open {
    visibility: visible;
    opacity: 1;
}

.cart-drawer-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.cart-drawer-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: var(--espresso);
    color: var(--white);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
}

.cart-drawer.open .cart-drawer-content {
    transform: translateX(0);
}

.cart-drawer-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-drawer-header h5 {
    color: var(--white);
    margin: 0;
    font-weight: 700;
}

.cart-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 25px;
}

.cart-drawer-footer {
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-total-amount {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--gold);
}

.cart-empty {
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   Footer Styles
   ======================================== */
.footer-main {
    position: relative;
    background: var(--gray-900);
    color: var(--white);
}

.footer-wave {
    position: absolute;
    top: -119px;
    left: 0;
    right: 0;
    pointer-events: none;
}

.footer-wave svg {
    width: 100%;
    height: 120px;
}

.footer-content {
    padding: 80px 0 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 800;
}

.footer-brand .brand-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
    color: var(--espresso);
    font-size: 1.5rem;
}

.footer-about {
    color: var(--gray-400);
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.social-link {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: var(--white);
    font-size: 1.2rem;
    transition: all var(--transition-normal);
}

.social-link:hover {
    background: var(--gold);
    color: var(--espresso);
    transform: translateY(-3px);
}

.footer-title {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 12px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: var(--gold);
    border-radius: var(--radius-full);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--gray-400);
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--gold);
    padding-right: 8px;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 18px;
    color: var(--gray-400);
}

.footer-contact i {
    color: var(--gold);
    font-size: 1.1rem;
    margin-top: 3px;
}

.footer-contact span {
    color: #ffffff !important;
}

.footer-bottom {
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.payment-methods {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* ========================================
   Page Specific Styles
   ======================================== */
.page-header {
    background: var(--gradient-dark);
    padding: 160px 0 80px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('https://images.unsplash.com/photo-1447933601403-0c6688de566e?w=1920') center/cover;
    opacity: 0.2;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 15px;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item {
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb-item a {
    color: var(--gold);
}

.breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.5);
}

.breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.4);
}

/* ========================================
   Form Styles
   ======================================== */
.form-control,
.form-select {
    padding: 14px 20px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-family: var(--font-primary);
    transition: all var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.15);
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--espresso);
}

/* ========================================
   Responsive Styles
   ======================================== */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        gap: 30px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .navbar-collapse {
        background: rgba(44, 24, 16, 0.98);
        margin-top: 15px;
        padding: 20px;
        border-radius: var(--radius-lg);
    }

    .navbar-actions {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .footer-content {
        padding: 60px 0 30px;
    }
}

/* ========================================
   Loading & Animations
   ======================================== */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 10000;
}

.toast-custom {
    background: var(--espresso);
    color: var(--white);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
}

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

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

/* ========================================
   Stock Status Badges
   ======================================== */
.product-badge.out-of-stock {
    background: var(--gray-600);
    color: var(--white);
    top: auto;
    bottom: 45px;
    right: 15px;
}

.product-badge.low-stock {
    background: var(--warning);
    color: var(--espresso);
    top: auto;
    bottom: 45px;
    right: 15px;
}

/* ========================================
   Wishlist Button
   ======================================== */
.wishlist-btn.active,
.wishlist-btn:hover {
    background: var(--white);
    color: var(--danger);
}

.wishlist-btn.active i {
    animation: heartBeat 0.5s ease;
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }
}

/* ========================================
   Search Dropdown
   ======================================== */
.search-wrapper {
    position: relative;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--espresso);
    transition: background var(--transition-fast);
}

.search-item:hover {
    background: var(--cream);
}

.search-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.search-item .name {
    font-weight: 600;
    display: block;
}

.search-item .price {
    color: var(--gold-dark);
    font-weight: 700;
    font-size: 0.9rem;
}

/* ========================================
   Skeleton Loading
   ======================================== */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-card {
    height: 350px;
    border-radius: var(--radius-lg);
}

.skeleton-text {
    height: 20px;
    margin-bottom: 10px;
}

.skeleton-text-sm {
    height: 14px;
    width: 60%;
}

/* ========================================
   Page Header
   ======================================== */
.page-header {
    background: var(--gradient-dark);
    color: var(--white);
    padding: 140px 0 60px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%239C92AC' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.page-title {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 15px;
    position: relative;
}

.page-header .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.page-header .breadcrumb-item a {
    color: var(--gold);
}

.page-header .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.7);
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   Custom Cart SVG Icons
   ======================================== */
.cart-icon,
.cart-icon-add,
.cart-icon-empty {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.cart-icon {
    width: 24px;
    height: 24px;
}

.cart-icon-add {
    width: 18px;
    height: 18px;
}

.cart-icon-empty {
    width: 80px;
    height: 80px;
    opacity: 0.5;
}

/* Cart icon in buttons */
.btn .cart-icon,
.btn .cart-icon-add {
    margin-left: 0;
}

/* Cart drawer header */
.cart-drawer-header .cart-icon {
    width: 20px;
    height: 20px;
}

/* Navbar cart icon */
.cart-toggle .cart-icon {
    width: 22px;
    height: 22px;
}

/* ========================================
   Modern Quantity Controls
   ======================================== */
.quantity-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid var(--gold);
    border-radius: var(--radius-full);
    padding: 4px;
    position: relative;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(201, 162, 39, 0.15);
}

.quantity-controls:hover {
    box-shadow: 0 6px 20px rgba(201, 162, 39, 0.25);
    border-color: var(--gold-light);
}

.qty-btn-modern {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-gold);
    border: none;
    border-radius: 50%;
    color: var(--espresso);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 2px 8px rgba(201, 162, 39, 0.3);
    position: relative;
    overflow: hidden;
}

.qty-btn-modern:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.4);
}

.qty-btn-modern:active:not(:disabled) {
    transform: scale(0.95);
}

.qty-btn-modern:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.qty-btn-modern i {
    position: relative;
    z-index: 2;
}

/* Ripple effect on click */
.qty-btn-modern::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.qty-btn-modern:active::before {
    transform: scale(1);
}

.qty-display {
    min-width: 45px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--espresso);
    background: transparent;
    border: none;
    text-align: center;
    position: relative;
}

.qty-display::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background: var(--gradient-gold);
    border-radius: var(--radius-full);
}

/* Loading state */
.quantity-controls.loading {
    pointer-events: none;
}

.quantity-controls .qty-loading {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: var(--radius-full);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.quantity-controls.loading .qty-loading {
    display: flex;
}

.qty-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--cream);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success pulse animation */
.quantity-controls.success {
    animation: pulse 0.4s ease;
}

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

    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 25px rgba(201, 162, 39, 0.4);
    }

    100% {
        transform: scale(1);
    }
}

/* Smooth update animation for totals */
.cart-total-updating {
    animation: fadeUpdate 0.3s ease;
}

@keyframes fadeUpdate {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

/* Error state */
.quantity-controls.error {
    border-color: var(--danger);
    animation: shake 0.4s ease;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .qty-btn-modern {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .qty-display {
        min-width: 40px;
        height: 32px;
        font-size: 0.95rem;
    }
}

/* ========================================
   Mobile Horizontal Scroll Fix
   ======================================== */
@media (max-width: 1024px) {

    html,
    body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Ensure fixed elements don't cause horizontal scroll */
    .announcement-bar,
    .navbar-main,
    .cart-drawer,
    .time-theme-indicator,
    .coffee-scroll-progress {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Fix for hero section */
    .hero-section {
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Fix for container overflow */
    .container,
    .container-fluid {
        max-width: 100%;
        overflow-x: hidden;
    }
}