/* --- Design System & Variables --- */
:root {
    --primary: #0076ff;
    --primary-rgb: 0, 118, 255;
    --secondary: #0051ff;
    --accent: #00f2ff;
    --success: #27ae60;
    --danger: #eb4d4b;
    --warning: #f0932b;
    --hover: #0056b3;

    --bg-light: #f8faff;
    --surface-light: #ffffff;
    --text-light: #1e272e;
    --muted-light: #808e9b;
    --border-light: rgba(0, 0, 0, 0.08);
    --glass-light: rgba(255, 255, 255, 0.7);

    --bg-dark: #07090f;
    --surface-dark: #12141d;
    --text-dark: #f1f2f6;
    --muted-dark: #a4b0be;
    --border-dark: rgba(255, 255, 255, 0.1);
    --glass-dark: rgba(18, 20, 29, 0.8);

    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

[data-theme="dark"] {
    --bg: var(--bg-dark);
    --surface: var(--surface-dark);
    --text: var(--text-dark);
    --muted: var(--muted-dark);
    --border: var(--border-dark);
    --glass: var(--glass-dark);
}

:root:not([data-theme="dark"]) {
    --bg: var(--bg-light);
    --surface: var(--surface-light);
    --text: var(--text-light);
    --muted: var(--muted-light);
    --border: var(--border-light);
    --glass: var(--glass-light);
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    direction: rtl;
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    font-family: inherit;
}

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

/* Hide Horizontal Scrollbars globally */
.categories-scroll-wrapper,
.featured-boxes-grid,
.products-grid,
.p-main-slider {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.categories-scroll-wrapper::-webkit-scrollbar,
.featured-boxes-grid::-webkit-scrollbar,
.products-grid::-webkit-scrollbar,
.p-main-slider::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

/* --- Components --- */
.glass-effect {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: var(--glass);
    border: 1px solid var(--border);
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 40px;
    height: 4px;
    background: var(--primary);
    border-radius: 2px;
}

/* --- Buttons --- */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 118, 255, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 118, 255, 0.4);
}

.glow-btn {
    position: relative;
    overflow: hidden;
}

.glow-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.glow-btn:hover::before {
    opacity: 1;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all 0.3s;
}

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

/* --- Top Header --- */
.header-top {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    font-size: 13px;
    color: var(--muted);
}

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

.contact-info .divider {
    margin: 0 10px;
    color: var(--border);
}

.social-links a {
    margin-right: 15px;
    transition: color 0.3s;
}

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

/* --- Main Header --- */
.main-header {
    height: 80px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 20px;
}

.logo {
    font-size: 26px;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.logo span {
    color: var(--text);
}

.search-wrapper {
    flex: 1;
    max-width: 550px;
    margin: 0 15px;
    position: relative;
}

.search-wrapper input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border-radius: 50px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
}

.search-wrapper button {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.desktop-nav>ul {
    display: flex;
    gap: 18px;
}

.desktop-nav a {
    font-weight: 700;
    color: var(--muted);
    transition: color 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    font-size: 13px;
    white-space: nowrap;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--primary);
}

.desktop-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 25px;
    height: 4px;
    background: var(--primary);
    border-radius: 20px;
    box-shadow: 0 0 10px var(--primary);
}

/* Dropdown styling */
.has-dropdown {
    position: relative;
    padding: 10px 0;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    min-width: 220px;
    z-index: 1000;
    list-style: none;
    padding: 10px 0;
    gap: 0 !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    padding: 12px 20px;
    color: var(--text) !important;
    font-size: 14px !important;
    display: block !important;
    width: 100%;
    transition: background 0.3s;
}

.dropdown-menu a:hover {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary) !important;
}

/* --- Pages / Sections Visibility --- */
.page-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.page-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.admin-nav button {
    position: relative;
    padding: 10px 15px;
    transition: 0.3s;
    color: var(--text);
    border: none;
    background: none;
    font-weight: 700;
}

.admin-nav button.active {
    color: var(--primary);
}

.admin-nav button.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-right: 30px;
}

.icon-btn,
.cart-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
    border-radius: 50%;
    transition: background 0.3s;
}

.icon-btn:hover,
.cart-trigger:hover {
    background: rgba(var(--primary-rgb), 0.1);
}

.admin-login-btn {
    transition: transform 0.3s ease, color 0.3s ease;
}

.admin-login-btn:hover {
    color: var(--primary);
    transform: scale(1.1);
}

.icon-btn {
    font-size: 20px;
    color: var(--text);
}

.cart-trigger {
    position: relative;
    font-size: 22px;
    cursor: pointer;
}

.cart-badge {
    position: absolute;
    top: 2px;
    left: 2px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 50%;
    font-weight: 900;
}

.mobile-menu-btn {
    display: none;
    font-size: 22px;
    color: var(--text);
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-search-container {
    display: none;
}

/* --- Hero Section --- */
.hero-container {
    padding-top: 40px;
    padding-bottom: 60px;
}

.hero-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: var(--radius-lg);
    padding: 60px;
    display: flex;
    align-items: center;
    gap: 40px;
    height: 520px;
    position: relative;
    overflow: hidden;
    color: white;
    transition: opacity 0.5s ease-in-out;
}

.hero-content {
    flex: 1;
    z-index: 2;
}

.hero-content .badge {
    background: var(--primary);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: inline-block;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 18px;
    color: #cbd5e1;
    margin-bottom: 35px;
}

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

.hero-visual {
    flex: 1;
    position: relative;
    z-index: 2;
    padding-left: 20px;
}

.floating-img {
    animation: floating 6s ease-in-out infinite;
    width: 100%;
    max-width: 550px;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

@keyframes floating {

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

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

.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: var(--primary);
    filter: blur(120px);
    opacity: 0.4;
    z-index: -1;
}

/* --- Feature Boxes --- */
.featured-boxes-grid,
#boxesList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 100px;
    padding-top: 20px;
}

#boxesList {
    margin-bottom: 20px;
}

.category-box {
    background: var(--surface);
    padding: 30px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 200px;
}

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

.category-box img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 20px;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* --- Categories Section --- */
.categories-section {
    margin-bottom: 100px;
}

.categories-circles {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.cat-circle {
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.cat-circle .img-wrapper {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #ffffff;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    margin-bottom: 12px;
    border: 3px solid transparent;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    position: relative;
}

.cat-circle .img-wrapper img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.cat-circle:hover .img-wrapper {
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 118, 255, 0.4);
}

.cat-circle:hover .img-wrapper img {
    transform: scale(1.1);
}

.cat-circle span {
    font-weight: 700;
    color: var(--text);
    font-size: 15px;
}

/* --- Products Grid --- */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
}

.latest-section {
    margin-bottom: 120px;
    margin-top: 40px;
}

.product-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 15px;
    border: 1px solid var(--border);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}

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

.card-img-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, rgba(130, 130, 130, 0.1) 25%, rgba(130, 130, 130, 0.25) 50%, rgba(130, 130, 130, 0.1) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 2s infinite linear;
    margin-bottom: 12px;
    cursor: pointer;
    position: relative;
}

@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    color: transparent;
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.4s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.product-overlay i {
    color: white;
    font-size: 32px;
    transform: scale(0.5);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.product-card:hover .product-overlay,
.product-card:active .product-overlay {
    opacity: 1;
}

.product-card:hover .product-overlay i,
.product-card:active .product-overlay i {
    transform: scale(1);
}

.product-card:hover .card-image,
.product-card:active .card-image {
    transform: scale(1.15);
}

.card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
    min-height: 48px;
    max-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
}

.price-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.current-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
}

.old-price {
    font-size: 14px;
    color: var(--muted);
    text-decoration: line-through;
}

.add-to-cart-btn {
    background: var(--primary);
    color: white;
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.3s;
    margin-top: auto;
}

.add-to-cart-btn:hover {
    background: var(--secondary);
}

/* --- Promo Banners --- */
.promo-banners {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 100px;
    margin-top: 40px;
}

.promo-card {
    padding: 40px;
    border-radius: var(--radius-lg);
    color: white;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-align: center;
}

.promo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.8));
    z-index: -1;
}

.promo-text {
    z-index: 2;
    width: 100%;
}

.promo-text h3 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 15px;
    color: #ffffff;
}

.promo-text p {
    margin-bottom: 25px;
    opacity: 0.9;
    color: #f1f2f6;
    font-size: 18px;
}

.btn-white {
    background: #ffffff;
    color: var(--primary);
    padding: 12px 30px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    font-size: 16px;
    display: inline-block;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
}

.btn-white:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.gradient-blue {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
}

.gradient-dark {
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.promo-text {
    z-index: 2;
    width: 100%;
    color: #ffffff !important;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.promo-text h3 {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 15px;
    color: #ffffff;
}

.promo-text p {
    margin-bottom: 30px;
    opacity: 0.95;
    color: #ffffff;
    font-size: 19px;
    font-weight: 500;
}

.checkout-btn {
    background: linear-gradient(135deg, var(--success), #219150);
    color: white;
    padding: 20px;
    width: 100%;
    border-radius: var(--radius-md);
    font-size: 20px;
    font-weight: 900;
    margin-top: 25px;
    box-shadow: 0 10px 20px rgba(39, 174, 96, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.checkout-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 30px rgba(39, 174, 96, 0.3);
}

.checkout-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* --- Checkout & Cart --- */
.cart-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: flex-start;
}

.checkout-card {
    padding: 30px;
    border-radius: var(--radius-lg);
}

.checkout-card h3 {
    border-right: 4px solid var(--primary);
    padding-right: 15px;
    margin-bottom: 25px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
}

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

.radio-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.radio-card {
    cursor: pointer;
}

.radio-card input {
    display: none;
}

.radio-card .radio-content {
    background: var(--bg);
    border: 2px solid var(--border);
    padding: 15px;
    border-radius: var(--radius-sm);
    text-align: center;
    transition: 0.3s;
}

.radio-card input:checked+.radio-content {
    border-color: var(--primary);
    background: rgba(0, 118, 255, 0.05);
}

.order-summary-panel {
    margin: 30px 0;
    background: rgba(0, 0, 0, 0.03);
    padding: 25px;
    border-radius: var(--radius-md);
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-weight: 600;
}

.summary-line.total {
    font-size: 22px;
    font-weight: 900;
    color: var(--primary);
}

/* --- Footer --- */
footer {
    background: #0f172a;
    color: #e2e8f0;
    padding-top: 100px;
    margin-top: 50px;
    border-top: 2px solid var(--border);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
    padding-bottom: 60px;
}

.footer-col h3 {
    color: #fff;
    margin-bottom: 25px;
    font-size: 20px;
    font-weight: 800;
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.footer-social a:hover {
    background: var(--primary);
}

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

.fast-links a:hover {
    color: var(--primary);
    padding-right: 5px;
}

.bottom-bar {
    background: #0b1120;
    text-align: center;
    padding: 20px;
    font-size: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 0 10px;
}

.section-header .section-title {
    margin-bottom: 0;
}

.view-all-btn {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 20px;
    background: rgba(0, 118, 255, 0.05);
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: var(--primary);
    color: white;
}

/* Horizontal Scroll */
.scroll-container {
    position: relative;
    width: 100%;
}

.scroll-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 100%;
    background: linear-gradient(to right, var(--bg), transparent);
    pointer-events: none;
    z-index: 2;
    opacity: 0;
}

.products-grid.horizontal-scroll {
    display: flex;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    padding: 15px 5px;
    gap: 20px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    align-items: stretch;
}

.products-grid.horizontal-scroll::-webkit-scrollbar {
    height: 4px;
}

.products-grid.horizontal-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.products-grid.horizontal-scroll::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}

.products-grid.horizontal-scroll .product-card {
    min-width: 200px;
    max-width: 200px;
    flex-shrink: 0;
}

/* Product Details Gallery */
.p-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.p-slider-container {
    width: 100%;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #fff;
    border: 1px solid #e1e8ed;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.p-main-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    height: 450px;
}

.p-main-slider::-webkit-scrollbar {
    display: none;
}

.p-slide {
    flex: 0 0 100%;
    scroll-snap-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.p-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.p-thumbnails {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
    width: 100%;
}

.p-thumbnails img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    padding: 2px;
    flex-shrink: 0;
}

.p-thumbnails img.active {
    border-color: var(--primary);
}

/* Buy Now Buttons */
.buy-now-btn {
    background: var(--success) !important;
    color: white !important;
}

.buy-now-btn:hover {
    background: #219150 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

/* Quantity Selector */
.qty-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.qty-controls {
    display: flex;
    align-items: center;
    border: 1px solid var(--primary);
    border-radius: 8px;
    overflow: hidden;
    height: 45px;
    background: var(--surface);
}

.qty-controls button {
    width: 40px;
    height: 100%;
    background: var(--surface);
    color: var(--primary);
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.qty-controls button:hover {
    background: var(--primary);
    color: white;
}

.qty-controls input {
    width: 60px;
    height: 100%;
    border: none;
    border-left: 1px solid var(--primary);
    border-right: 1px solid var(--primary);
    text-align: center;
    font-weight: bold;
    font-size: 18px;
    outline: none;
    background: var(--bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Redesigned Actions */
.p-actions-row {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.p-actions-row .btn-blue {
    background: #0056b3;
    color: white;
    flex: 1.5;
    padding: 15px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 18px;
}

.p-actions-row .btn-green {
    background: #27ae60;
    color: white;
    flex: 1;
    padding: 15px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 18px;
}

.p-actions-row .btn-green:hover {
    background: #219150;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.p-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #ff9f43;
    font-size: 16px;
    margin-bottom: 5px;
}

.p-pricing-large {
    font-size: 34px;
    font-weight: 900;
    color: #0056b3;
}

.p-pricing-large span {
    font-size: 20px;
    margin-right: 5px;
}

.p-total-price-msg {
    font-size: 14px;
    color: var(--muted);
    margin: 10px 0;
}

@media (max-width: 900px) {
    .product-details-grid {
        grid-template-columns: 1fr;
        direction: rtl;
    }

    .p-actions-row {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .products-grid.horizontal-scroll .product-card {
        min-width: 170px;
        max-width: 170px;
    }

    /* Category View Product Grid: 2 Columns */
    .products-grid:not(.horizontal-scroll) {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 10px 0 !important;
    }

    .product-card {
        padding: 10px !important;
        border-radius: var(--radius-sm) !important;
    }

    .card-img-container {
        height: 140px !important;
        margin-bottom: 8px !important;
    }

    .product-card h3 {
        font-size: 13px !important;
        line-height: 1.3 !important;
        min-height: 34px !important;
        max-height: 34px !important;
        margin-bottom: 4px !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        flex: none !important;
    }

    .price-box {
        gap: 6px !important;
        margin-bottom: 10px !important;
        flex-wrap: wrap !important;
    }

    .current-price {
        font-size: 15px !important;
    }

    .old-price {
        font-size: 11px !important;
    }

    .add-to-cart-btn {
        padding: 8px !important;
        font-size: 12px !important;
    }

    .cat-circle .img-wrapper {
        width: 80px;
        height: 80px;
    }

    .cat-circle span {
        font-size: 12px;
    }
}

/* --- Responsive Original --- */
@media (max-width: 992px) {
    .hero-card {
        flex-direction: column;
        padding: 40px;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-btns {
        justify-content: center;
    }

    .cart-layout {
        grid-template-columns: 1fr;
    }

    .promo-banners {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {

    .desktop-nav,
    .search-wrapper {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Categories Horizontal Scroll on Mobile */
    .categories-scroll-wrapper {
        margin: 0 -24px;
        padding: 0 24px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .categories-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }

    .categories-circles {
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 20px;
        padding-bottom: 20px;
    }

    .cat-circle {
        flex-shrink: 0;
    }

    /* Hero adjustments */
    .hero-card {
        padding: 40px 20px;
        min-height: auto;
    }

    .hero-content h1 {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .hero-content p {
        font-size: 15px;
        margin-bottom: 25px;
    }

    .hero-visual {
        padding-left: 0;
        margin-top: 30px;
    }

    .hero-visual img {
        max-width: 250px;
        margin: 0 auto;
    }

    .hero-dots {
        left: 50%;
        transform: translateX(-50%);
        bottom: 20px;
    }

    /* Mobile Search Bar Visibility */
    .mobile-search-container {
        padding: 10px 24px;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        display: block;
    }

    .mobile-search-container .search-wrapper {
        display: block;
        margin: 0;
        max-width: none;
    }

    /* Checkout & Form adjustments */
    .form-row,
    .radio-group {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .checkout-card {
        padding: 20px;
    }

    .checkout-panel {
        padding: 15px;
    }

    .order-summary-panel {
        padding: 15px;
    }

    .cart-item {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
    }

    .cart-item img {
        width: 100%;
        height: 120px;
        object-fit: contain;
        margin-bottom: 15px;
    }

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

    .cart-item-actions {
        margin-top: 0;
        align-self: center;
    }

    /* Hide top bar or stack it on mobile */
    .header-top {
        display: none;
    }

    .section-title {
        font-size: 20px;
    }

    .main-header {
        height: 60px;
    }

    .logo {
        font-size: 20px;
    }
}

/* --- Product Details Layout --- */
.product-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--surface);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.p-info-panel {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.p-gallery {
    /* Kept relative for any positioning if needed */
}

/* Removed broad .p-gallery img rule that caused thumbnail stretching */

.p-category-badge {
    background: rgba(0, 118, 255, 0.1);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 800;
}

.p-title {
    font-size: 32px;
    font-weight: 800;
    margin: 15px 0;
}

.p-pricing {
    margin-bottom: 25px;
}

.p-current {
    font-size: 28px;
    font-weight: 900;
    color: var(--primary);
}

.p-old {
    font-size: 18px;
    color: var(--muted);
    text-decoration: line-through;
    margin-right: 15px;
}

.p-description h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text);
}

.p-description p {
    color: var(--muted);
    line-height: 1.8;
}

.p-actions {
    margin-top: 35px;
    display: flex;
    gap: 15px;
}

.add-to-cart-btn.lg {
    padding: 18px 40px;
    font-size: 18px;
}

/* --- Mobile Menu --- */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    height: 100%;
    background: var(--surface);
    z-index: 2000;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 30px;
    box-shadow: var(--shadow-lg);
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.mobile-menu ul li {
    margin-bottom: 25px;
}

.mobile-menu ul li a {
    font-size: 20px;
    font-weight: 700;
}

@media (max-width: 768px) {
    .product-details-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 15px;
    }

    .p-gallery {
        order: 1;
    }

    .p-info-panel {
        order: 2;
        padding: 0 5px;
    }

    .p-description {
        order: 3;
        margin-top: 10px !important;
        padding-top: 20px !important;
        border-top: 1px solid var(--border) !important;
    }

    .p-title {
        font-size: 24px;
        margin: 8px 0;
    }

    /* Mobile Side Menu Accordion Styles */
    #mobileCategoriesNav {
        list-style: none;
        padding: 0;
        margin-top: 20px;
    }

    #mobileCategoriesNav li {
        margin-bottom: 2px;
        border-bottom: 1px solid rgba(var(--primary-rgb), 0.05);
    }

    #mobileCategoriesNav li a,
    .accordion-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px 10px;
        color: var(--text);
        font-weight: 700;
        font-size: 16px;
        text-decoration: none;
        cursor: pointer;
        transition: 0.3s;
        border-radius: 8px;
    }

    #mobileCategoriesNav li a.active,
    .accordion-header:hover {
        background: rgba(var(--primary-rgb), 0.05);
        color: var(--primary);
    }

    .accordion-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out;
        background: rgba(var(--primary-rgb), 0.02);
        display: flex;
        flex-direction: column;
        padding: 0 15px;
    }

    .accordion-content a {
        padding: 12px 15px !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        color: var(--muted) !important;
        border-bottom: none !important;
    }

    .mobile-accordion.active .accordion-content {
        max-height: 500px;
        padding-bottom: 10px;
    }

    .mobile-accordion.active .accordion-header {
        color: var(--primary);
        background: rgba(var(--primary-rgb), 0.05);
    }

    .mobile-accordion .fa-chevron-down {
        font-size: 12px;
        transition: transform 0.3s;
    }

    .mobile-accordion.active .fa-chevron-down {
        transform: rotate(180deg);
    }
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    margin-bottom: 25px;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
}

.p-video {
    margin: 25px 0;
}

.checkout-finalize-box {
    background: var(--surface);
    border: 2px solid var(--border);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
}

/* --- Active Orders In Cart --- */
.active-orders-section {
    background: rgba(39, 174, 96, 0.05);
    border: 2px dashed #27ae60;
    padding: 20px;
    border-radius: var(--radius-md);
    margin-bottom: 30px;
}

.active-orders-section h3 {
    color: #27ae60;
    margin-bottom: 20px;
    font-size: 18px;
    text-align: center;
}

.prev-order-row {
    background: var(--surface);
    padding: 10px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}

.cart-item.prev-item {
    border: none;
    background: transparent;
    padding: 5px;
}

/* --- Admin Order Cards --- */
.admin-orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.admin-order-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
    position: relative;
    border-right: 6px solid var(--primary);
}

.admin-order-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.admin-order-card.shipped {
    border-right-color: var(--success);
}

.admin-order-card.pending {
    border-right-color: var(--danger);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.order-id {
    font-weight: 800;
    color: var(--primary);
}

.order-date {
    font-size: 13px;
    color: var(--muted);
}

.order-cust-info {
    margin-bottom: 15px;
}

.order-cust-info h4 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 5px;
}

.order-cust-info p {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 3px;
}

.order-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.order-total-box {
    text-align: left;
}

.order-total-box .price {
    font-size: 22px;
    font-weight: 900;
    color: var(--text);
}

.order-actions-btns {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

@media (max-width: 768px) {
    .admin-orders-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Cart Item Styles --- */
.cart-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cart-item {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 15px;
    border-radius: var(--radius-sm);
    gap: 15px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
}

.cart-item img {
    width: 65px;
    height: 65px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: #f1f5f9;
}

.cart-item-details {
    flex: 1;
    text-align: right;
}

.cart-item-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 3px;
    color: var(--text);
}

.cart-item-price {
    color: var(--primary);
    font-weight: 800;
    font-size: 14px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.cart-item-actions span {
    font-weight: 800;
    color: var(--text);
    min-width: 20px;
    text-align: center;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.qty-btn {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: 900;
    color: var(--primary);
    cursor: pointer;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn {
    color: #ef4444;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    margin-right: 8px;
    transition: 0.3s;
}

.remove-btn:hover {
    transform: scale(1.2);
}

.prev-item {
    opacity: 0.8;
}

/* --- Payment Info Box --- */
.payment-info-box {
    background: rgba(var(--primary-rgb), 0.05);
    border: 1px solid var(--border);
    padding: 15px;
    border-radius: var(--radius-md);
    margin: 15px 0;
}

.payment-info-box p {
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--primary);
}

.payment-methods-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pay-method-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--surface);
    padding: 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.pay-method-item strong {
    color: var(--text);
    font-size: 16px;
    letter-spacing: 1px;
}

/* --- All Categories Grid --- */
.categories-circles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 30px;
    justify-items: center;
    padding: 40px 0;
}

@media (max-width: 768px) {
    .categories-circles-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 20px;
    }
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    /* Controlled by JS */
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-content {
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: modalAppear 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalAppear {
    from {
        transform: scale(0.8) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.modal-header h3 {
    margin: 0;
    font-size: 22px;
    color: var(--primary);
    font-weight: 800;
}

.close-modal {
    font-size: 24px;
    cursor: pointer;
    color: var(--muted);
    transition: all 0.3s;
}

.close-modal:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

.modal-content .form-group input {
    background: var(--bg);
    border: 2px solid var(--border);
    padding: 16px;
    margin-top: 8px;
    font-size: 16px;
    border-radius: var(--radius-md);
    transition: all 0.3s;
}

.modal-content .form-group input:focus {
    border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.1);
}

.w-100 {
    width: 100%;
}

/* --- WhatsApp Float --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50px;
    text-align: center;
    font-size: 35px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
    background-color: #128c7e;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    color: #fff;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
        font-size: 30px;
    }
}

/* --- Sub Banners (Banner 1 & 2) --- */
.sub-banners-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin: 40px auto;
}

.sub-banner-card {
    position: relative;
    height: 280px;
    border-radius: 20px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.sub-banner-card:hover {
    transform: translateY(-10px) scale(1.02);
}

.sub-banner-content {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sub-banner-content h3 {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.sub-banner-content p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 25px;
    font-weight: 500;
}

.promo-btn {
    background: white;
    color: var(--primary);
    border: none;
    padding: 12px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.promo-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

@media (max-width: 768px) {

    .sub-banners-container,
    .promo-banners {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
        margin: 30px auto;
    }

    .sub-banner-card,
    .promo-card {
        min-height: 180px;
        height: auto;
        padding: 25px 15px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .sub-banner-content,
    .promo-text {
        height: auto;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 10px;
        padding: 5px;
        width: 100%;
    }

    .sub-banner-content h3,
    .promo-text h3 {
        font-size: 16px;
        margin-bottom: 5px;
        font-weight: 800;
    }

    .sub-banner-content p,
    .promo-text p {
        font-size: 11px;
        line-height: 1.3;
        margin-bottom: 10px;
    }

    .promo-btn,
    .btn-white {
        padding: 8px 12px;
        font-size: 11px;
        margin-top: auto;
        display: inline-block;
        width: 100%;
        text-align: center;
    }

    /* Logo & Header Fix */
    .logo {
        font-size: 20px !important;
        flex-direction: row !important;
        display: flex !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        min-width: max-content !important;
        gap: 5px !important;
    }

    .header-actions {
        gap: 10px !important;
    }

    .header-container {
        gap: 10px !important;
        padding: 0 15px !important;
    }

    /* Hero Responsive */
    .hero-card {
        display: flex;
        flex-direction: column !important;
        height: auto;
        padding: 40px 20px;
        text-align: center;
        gap: 15px;
    }

    .hero-visual {
        order: 1;
        width: 100%;
        height: auto;
        padding: 0;
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .floating-img {
        height: 200px;
        order: 1;
    }

    .hero-dots {
        order: 2;
        position: static !important;
        transform: none !important;
        margin: 5px auto !important;
        justify-content: center;
        z-index: 10;
    }

    .hero-content {
        order: 2;
    }

    .hero-content h1 {
        font-size: 26px;
        margin-top: 10px;
    }

    .hero-content p {
        font-size: 14px;
        margin-bottom: 25px;
    }

    .hero-btns {
        justify-content: center;
        width: 100%;
        display: flex;
        gap: 12px;
    }

    .home-btn-mobile {
        display: flex !important;
    }

    /* Featured Boxes Horizontal Scroll */
    .featured-boxes-grid {
        display: flex !important;
        overflow-x: auto;
        gap: 15px;
        padding: 10px 10px 25px;
        margin-bottom: 20px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start !important;
    }

    .featured-boxes-grid::-webkit-scrollbar {
        height: 4px;
    }

    .featured-boxes-grid::-webkit-scrollbar-thumb {
        background: var(--primary);
        border-radius: 10px;
    }

    .featured-boxes-grid .category-box {
        flex: 0 0 160px;
        min-height: auto;
        padding: 20px 15px;
        scroll-snap-align: start;
    }

    .featured-boxes-grid .category-box img {
        width: 80px;
        height: 80px;
        margin-bottom: 10px;
    }

    .featured-boxes-grid .category-box h4 {
        font-size: 14px;
    }

    /* Mobile Search Bar */
    .mobile-search-container {
        display: block !important;
        padding: 15px;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        margin-top: 10px;
    }

    .mobile-search-container .search-wrapper {
        margin: 0;
        max-width: none;
    }

    .search-wrapper input {
        height: 45px;
    }
}

/* --- Pagination Styles --- */
.page-btn {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 700;
}
.page-btn:hover {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
}
.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* --- Daily Offer Section Fixes --- */
.daily-offer-section {
    margin-bottom: 50px;
    margin-top: 20px;
}

.daily-offer-card {
    border-radius: var(--radius-lg);
    padding: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: center;
    position: relative;
    overflow: hidden;
    color: white;
    box-shadow: var(--shadow-lg);
}

.offer-timer-box {
    flex: 1;
    min-width: 250px;
}

.offer-header-flex {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
}

.card-countdown {
    display: flex;
    gap: 5px;
}

.card-time-unit {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 5px;
    border-radius: 6px;
    text-align: center;
    min-width: 42px;
    border: 1px solid rgba(255,255,255,0.05);
}

.card-time-unit span {
    display: block;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    color: var(--accent);
}

.card-time-unit small {
    display: block;
    font-size: 8px;
    opacity: 0.7;
    color: white;
}

.daily-offer-content {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding: 10px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    width: 100%;
}

.daily-offer-content::-webkit-scrollbar {
    display: none;
}

.daily-offer-item {
    flex: 0 0 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    transition: transform 0.3s ease;
    scroll-snap-align: start;
}

.offer-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.daily-offer-item:hover {
    transform: translateY(-5px);
}

.offer-img {
    position: relative;
    width: 160px;
    height: 160px;
    flex-shrink: 0;
    background: white;
    border-radius: var(--radius-sm);
    padding: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.offer-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.daily-offer-item:hover .offer-img img {
    transform: scale(1.1);
}

.discount-badge {
    position: absolute;
    top: -12px;
    right: -12px;
    background: var(--danger);
    color: white;
    font-size: 13px;
    font-weight: 800;
    padding: 5px 12px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(235, 77, 75, 0.4);
    z-index: 2;
}

.offer-info h3 {
    font-size: 16px;
    margin-bottom: 0;
    color: white;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.offer-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.new-price {
    font-size: 22px;
    font-weight: 900;
    color: var(--accent);
}

.old-price {
    font-size: 16px;
    text-decoration: line-through;
    opacity: 0.7;
    color: #e2e8f0;
}

.daily-offer-item .btn-primary {
    background: var(--primary);
    border: 1px solid rgba(255,255,255,0.2);
}

@media (max-width: 768px) {
    .daily-offer-card {
        padding: 20px 10px;
    }
    
    .daily-offer-item {
        flex: 0 0 220px;
        padding: 15px;
    }
    
    .offer-img {
        width: 120px;
        height: 120px;
    }
    
    .offer-info h3 {
        font-size: 14px;
    }
    
    .new-price {
        font-size: 18px;
    }
}

/* --- Admin Order Card Product Details --- */
.admin-order-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: all 0.3s;
}

.admin-orders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.order-items-list {
    margin-top: 10px;
    padding: 12px;
    background: rgba(var(--primary-rgb), 0.05);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--primary);
    display: none;
}

.order-items-list.active {
    display: block;
    animation: slideDown 0.3s ease;
}

.order-item-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

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

.order-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
}

.order-item-qty {
    background: var(--primary);
    color: white;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 800;
    white-space: nowrap;
}

.order-actions-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Deposit Minimum Box --- */
.deposit-minimum-box {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08), rgba(var(--primary-rgb), 0.03));
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    animation: slideDown 0.4s ease;
}

.deposit-min-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.deposit-min-header i {
    color: var(--warning);
    font-size: 20px;
}

.deposit-min-header strong {
    color: var(--primary);
}

.deposit-min-amount {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary);
    margin: 10px 0;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.2);
}

.deposit-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(var(--primary-rgb), 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin: 12px 0 8px;
}

.deposit-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--danger), var(--warning), var(--success));
    border-radius: 10px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0%;
}

.deposit-min-note {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}

.deposit-min-note.error {
    color: var(--danger);
    font-weight: 700;
}

.deposit-min-note.success {
    color: var(--success);
    font-weight: 700;
}

#depositAmount.deposit-error {
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(235, 77, 75, 0.15);
}

#depositAmount.deposit-ok {
    border-color: var(--success) !important;
    box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.15);
}