/* ==========================================================================
   STUCK DIGITAL / DIGIRENT - MASTER CSS SYSTEM
   Style System: Tailwind-like Typography + Premium Orange Scheme + Dark/Light
   ========================================================================== */

/* ----------------------------------------------------
   1. COLOR SCHEME & THEME SYSTEM (Zinc + Premium Orange)
   ---------------------------------------------------- */

/* --- LIGHT MODE DEFAULT --- */
:root,
[data-bs-theme="light"] {
    /* Premium Orange Palette (Deep & Accessible) */
    --brand-primary: #ea580c; /* Orange 600 */
    --brand-primary-rgb: 234, 88, 12;
    --brand-primary-hover: #c2410c; /* Orange 700 */

    --brand-secondary: #64748b; /* Slate 500 */
    --brand-secondary-rgb: 100, 116, 139;

    --brand-success: #10b981; /* Emerald 500 */
    --brand-success-rgb: 16, 185, 129;
    --brand-warning: #f59e0b; /* Amber 500 */
    --brand-warning-rgb: 245, 158, 11;
    --brand-danger: #ef4444; /* Red 500 */
    --brand-danger-rgb: 239, 68, 68;
    --brand-info: #06b6d4; /* Cyan 500 */
    --brand-info-rgb: 6, 182, 212;

    /* Neutral Backgrounds & Surface (Pure Neutral/Zinc) */
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-subtle: #fff7ed; /* Soft Orange Tint */

    /* Text & Border Colors */
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;

    /* Bootstrap Variable Overrides */
    --bs-body-bg: var(--bg-main);
    --bs-body-color: var(--text-main);
    --bs-primary: var(--brand-primary);
    --bs-primary-rgb: var(--brand-primary-rgb);
    --bs-secondary: var(--brand-secondary);
    --bs-secondary-rgb: var(--brand-secondary-rgb);
    --bs-success: var(--brand-success);
    --bs-warning: var(--brand-warning);
    --bs-danger: var(--brand-danger);
    --bs-info: var(--brand-info);
    --bs-border-color: var(--border-color);

    --bs-card-bg: var(--bg-surface);
    --bs-card-border-color: var(--border-color);
    --bs-modal-bg: var(--bg-surface);
    --bs-tertiary-bg: var(--bg-surface-subtle);

    --bs-link-color: var(--brand-primary);
    --bs-link-hover-color: var(--brand-primary-hover);
}

/* --- DARK MODE OVERRIDES (AMOLED Friendly Zinc) --- */
[data-bs-theme="dark"] {
    --brand-primary: #f97316; /* Orange 500 (Vibrant in Dark) */
    --brand-primary-rgb: 249, 115, 22;
    --brand-primary-hover: #fb923c; /* Orange 400 */

    --brand-secondary: #a1a1aa; /* Zinc 400 */
    --brand-secondary-rgb: 161, 161, 170;

    /* Neutral Backgrounds & Surface (Rich Zinc) */
    --bg-main: #09090b; /* Zinc 950 */
    --bg-surface: #18181b; /* Zinc 900 */
    --bg-surface-subtle: #27272a; /* Zinc 800 */

    /* Text & Border Colors Dark */
    --text-main: #f4f4f5; /* Zinc 100 */
    --text-muted: #a1a1aa; /* Zinc 400 */
    --border-color: #27272a; /* Zinc 800 */

    --bs-body-bg: var(--bg-main);
    --bs-body-color: var(--text-main);
    --bs-primary: var(--brand-primary);
    --bs-primary-rgb: var(--brand-primary-rgb);
    --bs-secondary: var(--brand-secondary);
    --bs-border-color: var(--border-color);

    --bs-card-bg: var(--bg-surface);
    --bs-card-border-color: var(--border-color);
    --bs-modal-bg: var(--bg-surface);
    --bs-tertiary-bg: var(--bg-surface-subtle);

    --bs-link-color: var(--brand-primary);
    --bs-link-hover-color: var(--brand-primary-hover);
}

/* ----------------------------------------------------
   2. TYPOGRAPHY & TAILWIND-LIKE UTILITIES
   ---------------------------------------------------- */
:root {
    --bs-body-font-family: "Inter", sans-serif;
    --bs-body-font-size: 0.875rem; /* 14px (text-sm) */
    --bs-body-line-height: 1.25rem;
}

body {
    letter-spacing: -0.01em;
    font-family: var(--bs-body-font-family);
    background-color: var(--bg-main);
    color: var(--text-main);
    transition:
        background-color 0.25s ease,
        color 0.25s ease;
}

h1,
h2,
h3,
h4,
h5,
h6,
.fw-bold,
.fw-extrabold {
    letter-spacing: -0.02em;
}

/* Tailwind-like Font Size Helpers */
.text-2xs {
    font-size: 0.625rem;
    line-height: 0.875rem;
} /* 10px */
.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
} /* 12px */
.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
} /* 14px */
.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
} /* 16px */
.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
} /* 18px */

/* Ramping Headings */
h1,
.h1 {
    font-size: 1.875rem;
    letter-spacing: -0.025em;
} /* 30px */
h2,
.h2 {
    font-size: 1.5rem;
    letter-spacing: -0.025em;
} /* 24px */
h3,
.h3 {
    font-size: 1.25rem;
    letter-spacing: -0.025em;
} /* 20px */
h4,
.h4 {
    font-size: 1.125rem;
    letter-spacing: -0.025em;
} /* 18px */
h5,
.h5 {
    font-size: 1rem;
    letter-spacing: -0.02em;
} /* 16px */
h6,
.h6 {
    font-size: 0.875rem;
    letter-spacing: -0.02em;
} /* 14px */

/* Scrollbar Utility */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ----------------------------------------------------
   3. ALL BOOTSTRAP COMPONENTS OVERRIDE
   ---------------------------------------------------- */

/* Navigation Links */
a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--brand-primary-hover);
}

.nav-link {
    color: var(--text-muted) !important;
    transition: all 0.2s ease;
}
.nav-link:hover,
.nav-link:focus {
    color: var(--brand-primary) !important;
}
.nav-link.active,
.navbar-nav .nav-link.active {
    color: var(--brand-primary) !important;
    font-weight: 700;
}

/* Buttons System */
.btn {
    font-size: 0.8125rem !important; /* 13px */
    padding: 0.4rem 0.875rem !important;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.btn-xs {
    font-size: 0.75rem !important;
    padding: 0.25rem 0.625rem !important;
}

.btn-primary {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    background-color: var(--brand-primary-hover) !important;
    border-color: var(--brand-primary-hover) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(var(--brand-primary-rgb), 0.35) !important;
}

.btn-outline-primary {
    color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    background-color: transparent !important;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--brand-primary) !important;
    color: #ffffff !important;
}

/* Form Controls */
.form-control,
.form-select {
    font-size: 0.8125rem !important;
    padding: 0.4rem 0.75rem !important;
    border-radius: 0.5rem;
    background-color: var(--bg-surface) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color) !important;
}
.form-control::placeholder {
    font-size: 0.75rem !important;
    color: var(--text-muted);
}
.form-control:focus,
.form-select:focus {
    background-color: var(--bg-surface) !important;
    color: var(--text-main) !important;
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--brand-primary-rgb), 0.25) !important;
}

/* Badges & Status */
.badge {
    font-weight: 600;
    padding: 0.35em 0.65em;
}

.badge-status {
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.25em 0.65em;
    letter-spacing: 0.02em;
}
.badge-status-success {
    background-color: rgba(var(--brand-success-rgb), 0.15) !important;
    color: var(--brand-success) !important;
    border: 1px solid rgba(var(--brand-success-rgb), 0.3);
}
.badge-status-warning {
    background-color: rgba(var(--brand-warning-rgb), 0.15) !important;
    color: var(--brand-warning) !important;
    border: 1px solid rgba(var(--brand-warning-rgb), 0.3);
}
.badge-status-error {
    background-color: rgba(var(--brand-danger-rgb), 0.15) !important;
    color: var(--brand-danger) !important;
    border: 1px solid rgba(var(--brand-danger-rgb), 0.3);
}

/* Utility Class Custom Color */
.bg-surface {
    background-color: var(--bg-surface) !important;
    color: var(--text-main) !important;
}
.bg-surface-subtle {
    background-color: var(--bg-surface-subtle) !important;
}
.text-primary {
    color: var(--brand-primary) !important;
}
.text-muted {
    color: var(--text-muted) !important;
}

/* ----------------------------------------------------
   4. CAROUSEL BANNER & CATEGORY SCROLL
   ---------------------------------------------------- */
.promo-carousel {
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.promo-banner-item {
    position: relative;
    background-color: var(--bg-surface-subtle);
    min-height: 220px;
}

.promo-banner-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: right center;
}

.promo-content {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 60%;
    padding: 1.75rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    z-index: 2;
}

.promo-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--text-main);
}

.promo-subtitle {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
}

.promo-subtitle strong {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text-main);
}

.btn-shop-now {
    background-color: var(--brand-primary) !important;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    border: none;
    width: fit-content;
    box-shadow: 0 4px 12px rgba(var(--brand-primary-rgb), 0.35);
    transition: all 0.2s ease;
}

.btn-shop-now:hover {
    background-color: var(--brand-primary-hover) !important;
    transform: translateY(-1px);
}

.promo-carousel .carousel-indicators {
    margin-bottom: 0.75rem;
    gap: 6px;
    z-index: 10 !important;
}

.promo-carousel .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(148, 163, 184, 0.5);
    border: none;
    opacity: 1;
    transition: all 0.3s ease;
    cursor: pointer !important;
}

.promo-carousel .carousel-indicators .active {
    width: 20px;
    border-radius: 999px;
    background-color: var(--brand-primary);
}

/* Category Scroll Circles */
.category-scroll {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    min-width: 68px;
    text-align: center;
}

.category-img-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--bg-surface-subtle);
    margin-bottom: 0.35rem;
    border: 1px solid var(--border-color);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease;
}

.category-item:hover .category-img-wrapper {
    transform: scale(1.05);
    border-color: var(--brand-primary);
}

.category-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1.2;
}

/* ----------------------------------------------------
   5. DIGIRENT PRODUCT CARDS & FILTER PILLS
   ---------------------------------------------------- */
.filter-btn {
    background-color: var(--bg-surface) !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 999px;
    padding: 0.4rem 1.125rem;
    white-space: nowrap;
    font-weight: 600;
    font-size: 0.8125rem;
    transition: all 0.25s ease;
}

.filter-btn:hover {
    color: var(--text-main) !important;
    border-color: var(--brand-primary) !important;
}

.filter-btn.active {
    background-color: var(--brand-primary) !important;
    color: #ffffff !important;
    border-color: var(--brand-primary) !important;
    box-shadow: 0 2px 8px rgba(var(--brand-primary-rgb), 0.35);
}

.product-card {
    background-color: var(--bg-surface) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card.glow-hover:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--brand-primary-rgb), 0.5) !important;
    box-shadow: 0 8px 20px -4px rgba(var(--brand-primary-rgb), 0.25);
}

.product-icon-wrap {
    width: 4rem;
    height: 4rem;
    background-color: var(--bg-surface-subtle);
    border-radius: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.product-card:hover .product-icon-wrap {
    transform: scale(1.06);
}

.ptr-element {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    width: 100%;
    height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1020;
    pointer-events: none;
}

.ptr-icon-box {
    width: 38px;
    height: 38px;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: var(--brand-primary);
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.mobile-bottom-nav {
    z-index: 1040;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.nav-link-mobile {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    flex: 1;
}

.nav-link-mobile.active {
    color: var(--brand-primary);
}

@media (max-width: 767.98px) {
    #main-content {
        padding-bottom: 80px !important;
    }
}

.custom-scrollbar::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 99px;
    transition: background-color 0.2s ease;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: var(--brand-primary);
}

.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.modal-dialog-bottom-sheet .modal-body {
    max-height: 60vh !important;
    overflow-y: auto !important;
}

@media (min-width: 576px) {
    .modal-body {
        max-height: 450px !important;
        overflow-y: auto !important;
    }
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px !important;
    display: block !important;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: var(--brand-primary) !important;
    border-radius: 99px !important;
}

@keyframes bounceScroll {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(3px);
    }
}

.animate-bounce {
    display: inline-block;
    animation: bounceScroll 1s infinite ease-in-out;
}

@media (max-width: 575.98px) {
    .modal.modal-bottom-sheet {
        padding-right: 0 !important;
        padding-left: 0 !important;
    }

    .modal-dialog.modal-dialog-bottom-sheet {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        min-height: initial !important;
        transform: none !important;
    }

    .modal-dialog-bottom-sheet .modal-content {
        border-radius: 1.25rem 1.25rem 0 0 !important;
        border: none !important;
        border-top: 1px solid var(--border-color) !important;
        margin: 0 !important;
        max-height: 85vh;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.4);
    }

    .modal.fade .modal-dialog-bottom-sheet {
        transform: translateY(100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .modal.show .modal-dialog-bottom-sheet {
        transform: translateY(0) !important;
    }
}

/* Mencegah autozoom pada input di iOS */
input,
select,
textarea {
    font-size: 16px !important;
}

.qty-btn {
    touch-action: manipulation;
}
