/* ==========================================================================
   Nodaar Store - World Class Theme (Glassmorphism)
   ========================================================================== */

:root {
    /* Brand Palette - Premium Green & Gold */
    --primary: #0A8754;
    /* Green */
    --primary-light: #10B981;
    /* Green Light */
    --primary-dark: #065C3A;
    /* Green Dark */

    --secondary: #F5A623;
    /* Gold */
    --secondary-hover: #FBBF24;
    /* Gold Light */
    --accent: #F5A623;
    /* Gold */

    /* Backgrounds - Glassmorphism */
    --bg-body: #f8fafc;
    --bg-glass: rgba(255, 255, 255, 0.7);
    --bg-glass-strong: rgba(255, 255, 255, 0.9);
    --bg-card: rgba(255, 255, 255, 0.8);

    /* Text */
    --text-main: #1e293b;
    /* Slate 800 */
    --text-muted: #64748b;
    /* Slate 500 */
    --text-light: #94a3b8;
    /* Slate 400 */
    --text-white: #ffffff;

    /* UI Elements */
    --border: rgba(226, 232, 240, 0.6);
    --border-hover: rgba(99, 102, 241, 0.3);
    --radius: 16px;
    --radius-sm: 8px;
    --radius-full: 9999px;

    /* Shadows & Effects */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 15px rgba(10, 135, 84, 0.3);
    --blur: blur(12px);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', 'Inter', system-ui, sans-serif;
    background-color: var(--bg-body);
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(245, 158, 11, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

button {
    font-family: inherit;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* =========================================
   Glass Header
   ========================================= */
header {
    background: var(--bg-glass-strong);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    transition: var(--transition);
}

header.scrolled {
    padding: 0.75rem 0;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.store-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cart-btn {
    position: relative;
    background: white;
    border: 1px solid var(--border);
    padding: 0.75rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
    color: var(--primary);
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* =========================================
   Hero Section with Glass Card
   ========================================= */
.store-hero {
    padding: 4rem 1rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    background: var(--bg-glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 3rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.store-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--text-main), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.store-hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
}

/* =========================================
   Category Filters
   ========================================= */
.category-filters {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.25rem 0.25rem 0.75rem;
    /* Reduced bottom padding */
    margin-bottom: 0;
    /* Removed margin */
    scrollbar-width: none;
    flex: 1;
    /* Take available space */
    min-width: 0;
    /* Allow shrinking for scroll */
    align-items: center;
}

.category-filters::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    background: white;
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f1f5f9;
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.3);
}

/* =========================================
   Products Grid
   ========================================= */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding-bottom: 5rem;
}

/* Product Card - Glassmorphism */
.product-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: var(--primary-light);
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

.product-card:hover .product-overlay {
    opacity: 1;
    transform: translateY(0);
}

.btn-quick-view {
    background: white;
    color: var(--text-main);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.btn-quick-view:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-name {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.product-desc {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
}

.btn-add {
    background: var(--text-main);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-add:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* =========================================
   Skeleton Loading (Shimmer)
   ========================================= */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: var(--radius-sm);
}

.skeleton-card {
    background: white;
    border-radius: var(--radius);
    padding: 0;
    border: 1px solid var(--border);
    overflow: hidden;
}

.skeleton-img {
    height: 220px;
    width: 100%;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
}

.skeleton-content {
    padding: 1.5rem;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 10px;
    width: 80%;
}

.skeleton-text.short {
    width: 40%;
}

.skeleton-btn {
    height: 40px;
    width: 100px;
    border-radius: 12px;
    float: right;
}

/* =========================================
   Cart Drawer (Slide Order)
   ========================================= */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    bottom: 0;
    width: 100%;
    max-width: 400px;
    background: white;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    z-index: 201;
    transition: cubic-bezier(0.4, 0, 0.2, 1) 0.4s;
    display: flex;
    flex-direction: column;
}

.cart-drawer.active {
    right: 0;
}

.drawer-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
}

.drawer-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.btn-close-drawer {
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.btn-close-drawer:hover {
    background: #e2e8f0;
}

.drawer-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.drawer-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    background: #f8fafc;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed var(--border);
    margin-bottom: 1rem;
}

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
}

/* =========================================
   Toast Notifications
   ========================================= */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    animation: slideInUp 0.3s ease forwards;
    border-left: 4px solid var(--primary);
}

.toast.success {
    border-color: var(--secondary);
}

.toast i {
    color: var(--secondary);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   Store Controls (Search & Filter)
   ========================================= */
.store-controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    background: white;
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.search-container {
    padding: 0;
    position: relative;
    flex-grow: 1;
    min-width: 280px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    width: 20px;
    height: 20px;
}

#searchInput {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 3rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    background: #f8fafc;
    transition: var(--transition);
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.filters-row {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.sort-select {
    padding: 0.8rem 2rem 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: white;
    font-size: 0.9rem;
    color: var(--text-main);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

/* =========================================
   Quick View Modal
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 900px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-2xl);
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.btn-close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
}

.btn-close-modal:hover {
    background: #f1f5f9;
    transform: rotate(90deg);
}

.quick-view-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
}

.qv-image-container {
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.qv-image {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.qv-details {
    padding: 3rem;
    display: flex;
    flex-direction: column;
}

.qv-category {
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.qv-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.qv-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

.qv-description {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.qv-actions {
    display: flex;
    gap: 1rem;
    margin-top: auto;
}

.quantity-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.25rem;
}

.quantity-selector button {
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.quantity-selector button:hover {
    color: var(--text-main);
}

.quantity-selector span {
    width: 30px;
    text-align: center;
    font-weight: 600;
}

.btn-add-large {
    flex-grow: 1;
    background: var(--text-main);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-large:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* =========================================
   Footer
   ========================================= */
.store-footer {
    background: white;
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 900px) {
    .quick-view-grid {
        grid-template-columns: 1fr;
    }

    .qv-image-container {
        height: 300px;
        padding: 1rem;
    }

    .qv-details {
        padding: 1.5rem;
    }

    .qv-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 640px) {
    .store-hero h1 {
        font-size: 2rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .toast-container {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }
}

/* ==========================================================================
   Custom Modals & Alerts
   ========================================================================== */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.custom-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.custom-modal-content {
    background: white;
    width: 90%;
    max-width: 400px;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-2xl);
    text-align: center;
    transform: scale(0.95);
    transition: var(--transition);
}

.custom-modal-overlay.active .custom-modal-content {
    transform: scale(1);
}

.custom-modal-icon {
    width: 60px;
    height: 60px;
    background: #f1f5f9;
    color: var(--text-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.custom-modal-icon svg {
    width: 32px;
    height: 32px;
}

.custom-modal-icon.error {
    background: #fee2e2;
    color: #ef4444;
}

.custom-modal-icon.success {
    background: #d1fae5;
    color: #10b981;
}

.custom-modal-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.custom-modal-message {
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.btn-primary-full {
    background: var(--primary);
    color: white;
    width: 100%;
    border: none;
    padding: 0.8rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary-full:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 135, 84, 0.2);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}




@media (max-width: 640px) {
    .checkout-actions {
        grid-template-columns: 1fr;
    }
}

.btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 1rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    filter: brightness(1.1);
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: transparent;
    color: #25D366;
    border: 2px solid #25D366;
    padding: 1rem;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-whatsapp:hover {
    background: #25D366;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp svg {
    stroke: currentColor;
    stroke-width: 2.5;
}