/* ============================================================
   MAIN DESIGN CONFIGURATION (EDIT HERE)
   ============================================================
*/
:root {
    /* GLOBAL COLORS */
    --website-bg: #ffffff;
    --text-main: #111111;
    --text-muted: #999999;
    --accent-black: #1a1a1a;
    --border-light: #f5f5f5;
    --wishlist-red: #ff4757;

    /* DETAIL VIEW PAGE SETTINGS */
    --detail-page-bg: #ffffff;
    --detail-name-font: 'Inter', sans-serif;
    --detail-name-color: #111111;
    --detail-name-weight: 600;
    --detail-name-size-mob: 1.75rem;
    --detail-name-size-desk: 3rem;
    --detail-price-font: 'Inter', sans-serif;
    --detail-price-color: #111111;
    --detail-price-size: 1.5rem;
    --detail-label-color: #b0b0b0;
    --detail-label-font-size: 10px;
    --detail-desc-color: #555555;
    --detail-desc-size: 14px;

    --font-main: 'Inter', sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: var(--website-bg);
    color: var(--text-main);
    -webkit-tap-highlight-color: transparent;
    letter-spacing: -0.02em;
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

.serif-text {
    font-family: 'Playfair Display', serif;
}

/* DETAIL VIEW CSS CLASSES */
.detail-view-container {
    background-color: var(--detail-page-bg);
    text-align: left;
}

.detail-product-name {
    font-family: var(--detail-name-font);
    color: var(--detail-name-color);
    font-weight: var(--detail-name-weight);
    font-size: var(--detail-name-size-mob);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .detail-product-name {
        font-size: var(--detail-name-size-desk);
    }
}

.detail-price-text {
    font-family: var(--detail-price-font);
    color: var(--detail-price-color);
    font-size: var(--detail-price-size);
    font-weight: 700;
}

.detail-label {
    font-size: var(--detail-label-font-size);
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--detail-label-color);
    margin-bottom: 4px;
    display: block;
    text-transform: uppercase;
}

.detail-description-text {
    color: var(--detail-desc-color);
    font-size: var(--detail-desc-size);
    line-height: 1.6;
}

/* CUSTOMER VIEW - Home Card Styling */
.product-card h3 {
    font-size: 13px;
    font-weight: 600;
}

.price-tag {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.brand-logo {
    font-weight: 900;
    letter-spacing: 0.25em;
    font-size: 15px;
}

@media (min-width: 768px) {
    .brand-logo {
        font-size: 20px;
    }
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    cursor: pointer;
    width: 75px;
    gap: 8px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    /* Ensure offsetLeft is reliable */
}

.category-img-box {
    width: 66px;
    height: 66px;
    border-radius: 20px;
    padding: 3px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    transition: transform 0.6s ease;
}

/* PREMIUM GOLD BREATHING ANIMATION WITH WHITE GAP */
@keyframes goldBreathing {
    0% {
        box-shadow: 0 0 0 3px #fff, 0 0 0 4px #111;
        transform: translateY(-6px);
    }

    50% {
        box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px #D4AF37;
        transform: translateY(-8px);
    }

    100% {
        box-shadow: 0 0 0 3px #fff, 0 0 0 4px #111;
        transform: translateY(-6px);
    }
}

.active.category-item .category-img-box {
    animation: goldBreathing 3s infinite ease-in-out;
    border-color: transparent;
    /* Hide direct border when active to show the gap shadow */
}

.active.category-item .category-img-box img {
    transform: scale(1.1);
}

.active.category-item .category-label {
    color: #111;
    font-weight: 900;
    position: relative;
}

.active.category-item .category-label::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #D4AF37;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.8);
}

/* PREMIUM BUTTON ANIMATION (GOLD/BLACK LINE EFFECT) */
@keyframes buttonPremiumGlow {
    0% {
        border-color: rgba(0, 0, 0, 0.1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    50% {
        border-color: #D4AF37;
        box-shadow: 0 5px 25px rgba(212, 175, 55, 0.3);
    }

    100% {
        border-color: rgba(0, 0, 0, 0.1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
}

.premium-btn-anim {
    animation: buttonPremiumGlow 3s infinite ease-in-out;
    border-width: 1.5px;
}

.category-label {
    font-size: 8.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #888;
    text-align: center;
    max-width: 100%;
    transition: all 0.3s ease;
}

.img-container {
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #fafafa;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    position: relative;
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s ease, opacity 0.8s ease;
    opacity: 0;
    will-change: opacity, transform;
}

.img-container img.loaded {
    opacity: 1;
}


/* Smoothing image entry */
img {
    transition: opacity 0.5s ease;
}

img:not([src]),
img[src=""] {
    opacity: 0;
}

/* NEW USABILITY ENHANCEMENTS */
.category-scroll-container {
    position: relative;
    margin-bottom: 2.5rem;
}

.category-scroll-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 100%;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.9), transparent);
    pointer-events: none;
    z-index: 5;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.category-scroll-container.scrolled-end::after {
    opacity: 0;
}

@keyframes scrollHint {
    0% {
        transform: translateX(0);
    }

    15% {
        transform: translateX(-30px);
    }

    30% {
        transform: translateX(0);
    }
}

@keyframes scrollHint {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.scroll-hint-active {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4) !important;
    border-color: #D4AF37 !important;
}

/* SEARCH TAGS */
.search-tag {
    padding: 6px 12px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 100px;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.search-tag:hover {
    background: #111;
    color: #fff;
    border-color: #111;
    transform: translateY(-2px);
}

@media (max-width: 767px) {
    .select-btn {
        display: none !important;
    }

    #selection-bar {
        display: none !important;
    }

    .desktop-select-actions {
        display: none !important;
    }
}

.select-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    border: 1px solid #eee;
    transition: 0.3s;
}

.selected .select-btn {
    background: var(--accent-black);
    color: #fff;
    border-color: var(--accent-black);
}

/* WISHLIST BUTTON */
.wish-btn {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 21;
    border: 1px solid #eee;
    transition: 0.3s;
    color: #ccc;
}

.wish-active .wish-btn {
    color: var(--wishlist-red);
}

/* SELECTION BAR - Compact Centered */
#selection-bar {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-black);
    color: #fff;
    padding: 6px 12px;
    border-radius: 100px;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    width: auto;
    min-width: 180px;
    max-width: 95vw;
    backdrop-filter: blur(15px);
}

@keyframes slideUpCenter {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.animate-selection {
    animation: slideUpCenter 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.selection-count {
    font-size: 8.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding-left: 4px;
    white-space: nowrap;
}

#selection-bar button {
    font-size: 8px !important;
    padding: 4px 10px !important;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.thumb-grid {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.thumb-box {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: 0.3s;
}

.thumb-box.active {
    border-color: var(--accent-black);
    border-width: 1.5px;
}

/* Admin UI Fixes */
.admin-input {
    width: 100%;
    padding: 0.9rem 1.1rem;
    background: #f9f9f9;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    transition: 0.3s;
}

.admin-input:focus {
    background: #fff;
    border-color: var(--accent-black);
    outline: none;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

#toast {
    position: fixed;
    bottom: 85px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    display: none;
}

.spec-badge {
    background: #fff;
    border: 1px solid #eee;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #333;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.drop-zone {
    transition: all 0.3s ease;
    position: relative;
    background: #fff;
    border: 2px dashed #eee;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drop-zone.dragging {
    background: #f0f9ff !important;
    border: 2px dashed #3b82f6 !important;
    transform: scale(1.02);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.1);
}

.drop-zone.uploading::after {
    content: 'Uploading...';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #3b82f6;
    z-index: 10;
    border-radius: inherit;
}

/* NEW ADMIN LIST STYLING */
#admin-product-list-container {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 8px;
}

#admin-product-list-container::-webkit-scrollbar {
    width: 4px;
}

#admin-product-list-container::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

.admin-list-category-header {
    background: #fdfdfd;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    margin-top: 25px;
    margin-bottom: 15px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.stock-badge {
    font-size: 8px;
    font-weight: 900;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    margin-top: 4px;
    display: inline-block;
}

.stock-badge.in {
    background: #e6fffa;
    color: #319795;
}

.stock-badge.out {
    background: #fff5f5;
    color: #e53e3e;
}

/* IMAGE ZOOM EFFECT */
.zoom-img-container {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
    border-radius: 2.5rem;
    background: #fff;
    border: 1px solid #f5f5f5;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.zoom-img-container img {
    transition: transform 0.3s ease-out;
    transform-origin: center center;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
}

/* FULL SCREEN OVERLAY */
#img-full-preview {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    cursor: zoom-out;
}

#img-full-preview img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.close-preview-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
}

.close-preview-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* REVERTED ADMIN INPUTS */
.admin-input {
    width: 100%;
    padding: 0.9rem 1.1rem;
    background: #f9f9f9;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    transition: 0.3s;
}

.admin-input:focus {
    background: #fff;
    border-color: var(--accent-black);
    outline: none;
}

/* NEW LARGE ADMIN PRODUCT GRID */
#admin-product-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 1024px) {
    #admin-product-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

.admin-product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 20px;
    overflow: hidden;
    transition: 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
}

.admin-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
    border-color: #000;
}

.admin-product-img-box {
    aspect-ratio: 1/1;
    position: relative;
    background: #fdfdfd;
}

.admin-product-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-product-info {
    padding: 1rem;
}

.admin-card-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transition: 0.3s;
    z-index: 10;
}

.admin-product-card:hover .admin-card-actions {
    opacity: 1;
}

.admin-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #666;
    transition: 0.2s;
}

.admin-action-btn:hover {
    background: #000;
    color: #fff;
    transform: scale(1.1);
}

.admin-action-btn.delete:hover {
    background: #ff4757;
}

/* SIDEBAR STATE CLASSES */
#favorites-sidebar.open {
    transform: translateX(0);
}

#favorites-sidebar-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

/* SIDEBAR ITEM STYLING */
.sidebar-item {
    display: flex;
    gap: 15px;
    padding: 12px;
    background: #fff;
    border: 1px solid #f8f8f8;
    border-radius: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.sidebar-item:hover {
    border-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.sidebar-img-box {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    overflow: hidden;
    flex-shrink: 0;
    background: #fdfdfd;
}

.sidebar-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.sidebar-item-name {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #111;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-item-price {
    font-size: 10px;
    font-weight: 800;
    color: #999;
}

.sidebar-remove-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff5f5;
    color: #ff4757;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.sidebar-remove-btn:hover {
    background: #ff4757;
    color: #fff;
    transform: scale(1.1);
}

/* MOBILE BOTTOM NAV */
.mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #999;
    transition: all 0.3s ease;
    cursor: pointer;
    flex: 1;
    background: none;
    border: none;
    padding: 0;
}

.mobile-nav-btn i {
    font-size: 16px;
}

.mobile-nav-btn span {
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mobile-nav-btn:active {
    transform: scale(0.9);
}

.mobile-nav-btn.active {
    color: #111;
}

.mobile-nav-btn:hover {
    color: #111;
}

/* Specific styling for WhatsApp Expert */
.mobile-nav-btn i.fa-whatsapp {
    color: #25D366;
}

@media (min-width: 768px) {
    #mobile-bottom-nav {
        display: none !important;
    }
}