/* ===========================================
   PRINT STUDIO NZ - CATALOGUE THEME
   =========================================== */

:root {
    --header-height: 80px;      
    --color-primary: #E6D3A8;   /* Champagne Gold */
    --color-accent: #D5C39A;    /* Darker Champagne */
    --color-dark: #1C1C1C;      /* Soft Charcoal Black */
    --color-text: #4a4a4a;      /* Dark Grey Text */
    --color-bg: #fcfcfc;
    --color-border: #e2e8f0;
}

html, body {
    overflow-x: clip;
    padding-top: 0; 
    background-color: var(--color-bg);
    font-family: 'Figtree', sans-serif;
    color: var(--color-text);
}

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in-up { animation: fadeInUp 0.5s ease-out forwards; }


/* --- HEADER / HERO SECTION --- */
.dark-header-section {
    position: relative;
    background-color: #D9E2EC; 
    padding-top: 130px; 
    padding-bottom: 5rem; 
    margin-bottom: 0 !important; 
    color: var(--color-dark) !important; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    z-index: 10;
}

.dark-header-section h2, 
.dark-header-section p,
.dark-header-section .breadcrumb-item,
.dark-header-section .breadcrumb-item a,
.dark-header-section .breadcrumb-item.active {
    color: var(--color-dark) !important;
}

.dark-header-section::after { 
    content: ''; 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    height: 4px; 
    background: var(--color-primary); 
}

/* --- PREMIUM SIDEBAR NAV --- */
.sidebar-sticky { 
    position: sticky; 
    top: 110px; 
    max-height: calc(100vh - 130px); 
    overflow-y: auto; 
    padding-right: 15px; 
}

/* Custom scrollbar for the sidebar */
.sidebar-sticky::-webkit-scrollbar { width: 4px; }
.sidebar-sticky::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }

.nav-category-item { 
    margin-bottom: 4px; 
}

/* Main Category Buttons */
.nav-category-btn { 
    width: 100%; 
    text-align: left; 
    background: transparent; 
    border: none; 
    border-left: 3px solid transparent; /* The active edge placeholder */
    padding: 10px 15px; 
    font-weight: 600; 
    color: #64748b; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    border-radius: 0 8px 8px 0; /* Pill shape on right */
}

.nav-category-btn i {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    color: #cbd5e1;
}

.nav-category-btn:hover { 
    background: #f8fafc;
    color: var(--color-dark); 
}

.nav-category-btn.active { 
    color: var(--color-dark); 
    font-weight: 800; 
    border-left: 3px solid var(--color-primary); /* The active gold edge */
    background: linear-gradient(90deg, rgba(230, 211, 168, 0.15) 0%, rgba(255,255,255,0) 100%);
}

.nav-category-btn.active i {
    transform: rotate(180deg); 
    color: var(--color-dark);
}

/* Subcategory Container */
.nav-subcategory-container {
    margin-left: 18px; 
    border-left: 1px solid #e2e8f0; /* Crisp thin line */
    padding-left: 10px; 
    margin-top: 5px; 
    margin-bottom: 10px;
    display: none;
}

.nav-subcategory-container.show { 
    display: block; 
    animation: fadeInUp 0.3s ease; 
}

/* Subcategory Buttons */
.nav-subcategory-btn {
    width: 100%; 
    text-align: left; 
    background: transparent; 
    border: none;
    padding: 8px 12px; 
    font-size: 0.85rem; 
    color: #64748b; 
    transition: 0.2s;
    border-radius: 6px;
    margin-bottom: 2px;
}

.nav-subcategory-btn:hover { 
    color: var(--color-dark); 
    background: #f1f5f9; 
}

.nav-subcategory-btn.active { 
    color: var(--color-dark); 
    font-weight: 700; 
    background: rgba(230, 211, 168, 0.2); 
}


/* --- CARDS --- */
.product-card {
    border: 1px solid #e2e8f0; background: #fff; border-radius: 8px; overflow: hidden; position: relative;
    cursor: pointer; height: 100%; display: flex; flex-direction: column; transition: 0.3s ease;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); border-color: #cbd5e1; }

.card-img-container {
    height: 250px; width: 100%; background: #fff; display: flex; align-items: center; justify-content: center;
    padding: 20px; border-bottom: 1px solid #f8f9fa; position: relative; overflow: hidden;
}
.card-img-container img { max-height: 100%; max-width: 100%; object-fit: contain; transition: transform 0.4s ease; }
.product-card:hover .card-img-container img { transform: scale(1.08); }

.product-card .p-3 { padding: 15px !important; flex-grow: 1; display: flex; flex-direction: column; }
.product-card h6 {
    font-size: 0.95rem; font-weight: 700; color: var(--color-dark); margin-bottom: 0; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-code-badge { 
    font-size: 0.7rem; color: #6c757d; background: #f8f9fa; border: 1px solid #dee2e6; 
    padding: 2px 6px; border-radius: 4px; display: inline-block; width: fit-content; margin-bottom: 6px; font-weight: 600;
}
.card-view-btn {
    position: absolute; bottom: 15px; left: 50%; transform: translateX(-50%) translateY(20px);
    background-color: var(--color-dark); color: #fff; padding: 8px 20px; border-radius: 50px;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
    opacity: 0; transition: all 0.3s ease; white-space: nowrap; box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}
.product-card:hover .card-view-btn { opacity: 1; transform: translateX(-50%) translateY(0); background-color: var(--color-primary); color: var(--color-dark); }

/* --- MODAL --- */
.modal-content { border-radius: 12px; border: none; overflow: hidden; height: 90vh; display: flex; flex-direction: column; }
.modal-header { background: #fff; border-bottom: 1px solid #eee; padding: 15px 20px; flex-shrink: 0; }
.modal-body { flex-grow: 1; overflow: hidden; padding: 0; }
.modal-body .row { height: 100%; }

.modal-left-col { background: #fff; border-right: 1px solid #eee; overflow-y: auto; height: 100%; }
.modal-right-col { display: flex; flex-direction: column; height: 100%; }
.modal-content-scrollable { flex-grow: 1; overflow-y: auto; padding: 2rem; min-height: 0; }
.modal-footer-fixed { padding: 1.5rem; background: #fff; border-top: 1px solid #eee; margin-top: auto; flex-shrink: 0; }

.modal-main-img-wrap { 
    width: 100%; height: 350px; display: flex; align-items: center; justify-content: center; 
    background: #fff; border: 1px solid var(--color-border); border-radius: 4px; padding: 20px; margin-bottom: 15px;
}
.modal-main-img-wrap img { max-width: 100%; max-height: 100%; object-fit: contain; }
.modal-gallery-thumbs img { 
    width: 60px; height: 60px; object-fit: cover; border-radius: 4px; cursor: pointer; opacity: 0.5; border: 2px solid transparent; 
}
.modal-gallery-thumbs img.active { opacity: 1; border-color: var(--color-dark); }

/* Tabs & UI */
.nav-tabs .nav-link { color: #666; font-size: 0.85rem; text-transform: uppercase; font-weight: 700; }
.nav-tabs .nav-link.active { color: var(--color-dark); border-bottom: 2px solid var(--color-primary); }
.quote-summary-box { background: #f8fafc; border-radius: 8px; padding: 20px; border: 1px solid #e2e8f0; margin-top: 20px; }
.quote-total { font-size: 1.8rem; font-weight: 900; color: var(--color-dark); }

/* SLIDER */
.range-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 5px; background: #e2e8f0; outline: none; margin: 15px 0; }
.range-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--color-dark); cursor: pointer; border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: 0.15s; }
.range-slider::-webkit-slider-thumb:hover { transform: scale(1.1); background: var(--color-primary); }

/* Utils */
.loading-container { min-height: 40vh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.offcanvas-header { background: var(--color-dark); color: white; }
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* --- CUSTOM BRANDING BUTTONS (CHAMPAGNE GOLD) --- */
.btn-outline-primary {
    color: var(--color-dark) !important;
    border-color: var(--color-primary) !important;
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: rgba(230, 211, 168, 0.2) !important; 
    border-color: var(--color-primary) !important;
    color: var(--color-dark) !important;
}

.btn-check:checked + .btn-outline-primary, 
.btn-check:active + .btn-outline-primary {
    background-color: var(--color-primary) !important; 
    border-color: var(--color-primary) !important;
    color: var(--color-dark) !important;
    font-weight: 700;
}

/* Skeleton Loading Effect */
.skeleton-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    height: 350px; /* Matches your product card height */
    overflow: hidden;
}

.skeleton-img {
    height: 250px;
    background: #f1f5f9;
    position: relative;
}

.skeleton-text {
    height: 15px;
    background: #f1f5f9;
    margin: 15px;
    border-radius: 4px;
    width: 70%;
}

.skeleton-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.skeleton-shimmer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.8) 50%, 
        rgba(255,255,255,0) 100%);
    animation: shimmer 1.5s infinite;
}

/* --- ARTWORK PREVIEW UPLOAD BOX --- */
#artwork-preview-box {
    transition: all 0.3s ease;
    border-color: #e2e8f0 !important;
}

#artwork-thumbnail i {
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Ensure the file input looks clean when a file is selected */
input[type="file"]::file-selector-button {
    background-color: var(--color-dark);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    margin-right: 15px;
    transition: background-color 0.2s;
    cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
    background-color: var(--color-primary);
    color: var(--color-dark);
}

/* --- ARTWORK PREVIEW UPLOAD BOX --- */
#artwork-preview-box {
    transition: all 0.3s ease;
    border-color: #e2e8f0 !important;
}

#artwork-thumbnail i {
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Make the file input look like a real button */
input[type="file"]::file-selector-button {
    background-color: var(--color-dark);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    margin-right: 15px;
    transition: background-color 0.2s;
    cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
    background-color: var(--color-primary);
    color: var(--color-dark);
}

/* --- DYNAMIC BRANDING HELPER BOX --- */
#branding-info-box {
    animation: fadeIn 0.3s ease-in-out;
}
/* --- ARTWORK PREVIEW UPLOAD BOX --- */
#artwork-preview-box {
    transition: all 0.3s ease;
    border-color: #e2e8f0 !important;
}

#artwork-thumbnail i {
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Ensure the file input looks clean when a file is selected */
input[type="file"]::file-selector-button {
    background-color: var(--color-dark);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    margin-right: 15px;
    transition: background-color 0.2s;
    cursor: pointer;
}

input[type="file"]::file-selector-button:hover {
    background-color: var(--color-primary);
    color: var(--color-dark);
}

/* --- DYNAMIC BRANDING HELPER BOX --- */
#branding-info-box {
    animation: fadeIn 0.3s ease-in-out;
}