@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600&family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #8b5cf6;
    --primary-color-rgb: 99, 102, 241;

    --secondary-color: #06b6d4;
    --koperasi-secondary-darken: #0596b0;
    --accent-color: #10b981;

    --text-dark: #1f2937;
    --text-medium: #4b5563;
    --text-light: #6b7280;
    --koperasi-text-light-old: #7f8c8d;
    --text-muted: #9ca3af;

    --koperasi-success: #198754;
    --koperasi-success-rgb: 25, 135, 84;
    --koperasi-success-dark: #146c43;
    --koperasi-danger: #dc3545;
    --koperasi-danger-rgb: 220, 53, 69;
    --koperasi-warning: #ffc107;
    --koperasi-warning-rgb: 255, 193, 7;
    --koperasi-info: #0dcaf0;
    --koperasi-info-rgb: 13, 202, 240;

    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --bg-soft-gray: #f7f9fc;

    --border-color: #e5e7eb;
    --border-light: #f3f4f6;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-button-primary: linear-gradient(to right, var(--primary-color), var(--primary-light));
    --gradient-checkout-header: linear-gradient(90deg, var(--primary-color) 0%, #007bff 100%);
    --gradient-place-order-btn: linear-gradient(90deg, var(--koperasi-success) 0%, #16a085 100%);

    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Inter', sans-serif;

    --koperasi-sidebar-width: 260px;
    --koperasi-sidebar-bg-light: var(--bg-white);
    --koperasi-sidebar-text-light: var(--text-medium);
    --koperasi-sidebar-hover-bg-light: var(--bg-soft-gray);
    --koperasi-sidebar-active-text-light: var(--primary-color);
    --koperasi-sidebar-active-bg-light: rgba(var(--primary-color-rgb), 0.08);
    --koperasi-sidebar-border-light: var(--border-color);
}

* {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* padding-top: 76px; */ /* Dihapus atau dikomentari */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--text-dark);
    margin-top: 0;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out, opacity 0.2s ease-in-out;
}
a:hover {
    color: var(--primary-dark);
    opacity: 0.85;
}

.navbar-modern {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    z-index: 1050;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    height: 76px;
}
.navbar-modern.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}
.navbar-brand-modern {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none !important;
}
.navbar-brand-modern i {
    margin-right: 0.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.navbar-modern .navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}
.navbar-modern .navbar-toggler:focus {
    box-shadow: none;
}
.navbar-modern .navbar-toggler-icon {
    width: 1.2em;
    height: 1.2em;
}
.cart-icon-wrapper {
    position: relative;
    margin-right: 1rem;
}
.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    color: white;
    border-radius: 50%;
    border: 2px solid white;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.btn-login {
    background: var(--gradient-button-primary);
    color: white !important;
    border: none;
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.sidebar-custom-light {
    width: var(--koperasi-sidebar-width);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1020;
    padding-top: calc(76px + 1rem);
    background-color: var(--koperasi-sidebar-bg-light);
    color: var(--koperasi-sidebar-text-light);
    transition: margin-left 0.3s ease-in-out, transform 0.3s ease-in-out;
    border-right: 1px solid var(--koperasi-sidebar-border-light);
    overflow-y: auto;
}
.sidebar-custom-light .sidebar-heading {
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.sidebar-custom-light .nav-link {
    color: var(--koperasi-sidebar-text-light);
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    border-left: 4px solid transparent;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 0;
    margin: 0.1rem 0;
}
.sidebar-custom-light .nav-link i.fa-fw {
    margin-right: 1rem;
    width: 20px;
    text-align: center;
    font-size: 1.05em;
    color: var(--text-muted);
    transition: color 0.2s ease-in-out;
    flex-shrink: 0;
}
.sidebar-custom-light .nav-link:hover {
    color: var(--primary-color);
    background-color: var(--koperasi-sidebar-hover-bg-light);
    border-left-color: var(--primary-color);
}
.sidebar-custom-light .nav-link:hover i.fa-fw {
    color: var(--primary-color);
}
.sidebar-custom-light .nav-link.active {
    color: var(--koperasi-sidebar-active-text-light);
    font-weight: 600;
    background-color: var(--koperasi-sidebar-active-bg-light);
    border-left-color: var(--primary-color);
}
.sidebar-custom-light .nav-link.active i.fa-fw {
    color: var(--koperasi-sidebar-active-text-light);
}

#wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
}
#sidebar-wrapper {
    min-height: 100vh;
    width: var(--koperasi-sidebar-width);
    background-color: var(--koperasi-sidebar-bg-light);
    color: var(--koperasi-sidebar-text-light);
    transition: margin-left 0.3s ease-in-out, transform 0.3s ease-in-out;
    z-index: 1000;
    border-right: 1px solid var(--koperasi-sidebar-border-light);
    padding-top: calc(76px + 0.5rem);
    overflow-y: auto;
}
#sidebar-wrapper.toggled {
    margin-left: -var(--koperasi-sidebar-width);
}
#page-content-wrapper {
    width: calc(100% - var(--koperasi-sidebar-width));
    min-width: 0;
    transition: width 0.3s ease-in-out, margin-left 0.3s ease-in-out;
    padding-top: 76px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh);
}
#wrapper.toggled #page-content-wrapper {
    width: 100%;
    margin-left: 0;
}
.main-content {
    padding: 1.5rem;
    flex-grow: 1;
}

@media (max-width: 991.98px) {
    body { padding-top: 70px; }
    .navbar-modern { height: 70px; }
    #sidebar-wrapper {
        margin-left: -var(--koperasi-sidebar-width);
        z-index: 1031;
        position: fixed;
        left:0;
        top:0;
        height: 100%;
        padding-top: calc(70px + 0.5rem);
    }
    #sidebar-wrapper.toggled { margin-left: 0; }
    #page-content-wrapper { width: 100%; margin-left: 0; padding-top: 70px;}
    .sidebar-overlay {
        position: fixed; top: 0; left: 0; width: 100%; height: 100%;
        background-color: rgba(0,0,0,0.5); z-index: 1030; display: none;
    }
    .sidebar-overlay.show { display: block; }
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.8rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--border-color);
}
.page-header h1 {
    font-size: 1.75rem;
    color: var(--text-dark);
    margin: 0;
}
.page-header h1 i {
    margin-right: 0.75rem;
    color: var(--primary-color);
}

.card-custom {
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.8rem;
    background-color: var(--bg-white);
}
.card-custom .card-header {
    background-color: var(--bg-soft-gray);
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-family: var(--font-primary);
    padding: 1rem 1.25rem;
    color: var(--text-dark);
    font-size: 1.05rem;
    border-top-left-radius: calc(0.75rem - 1px);
    border-top-right-radius: calc(0.75rem - 1px);
}
.card-custom .card-header i {
    margin-right: 0.6rem;
    color: var(--primary-color);
}
.card-custom .card-body {
    padding: 1.5rem;
}
.card-custom .card-footer {
    background-color: var(--bg-soft-gray);
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    font-size: 0.85rem;
}

.btn {
    border-radius: 0.375rem;
    padding: 0.65rem 1.25rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    letter-spacing: 0.3px;
    font-size: 0.9rem;
}
.btn:focus, .btn.focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-color-rgb), 0.35);
}
.btn:active, .btn.active {
    transform: translateY(1px);
}
.btn-primary { background-color: var(--primary-color); border-color: var(--primary-color); color: #fff; }
.btn-primary:hover { background-color: var(--primary-dark); border-color: var(--primary-dark); }
.btn-success { background-color: var(--koperasi-success); border-color: var(--koperasi-success); color: #fff; }
.btn-success:hover { background-color: var(--koperasi-success-dark); border-color: var(--koperasi-success-dark); }
.btn-danger { background-color: var(--koperasi-danger); border-color: var(--koperasi-danger); color: #fff; }
.btn-danger:hover { background-color: #b02a37; border-color: #b02a37; }
.btn-warning { background-color: var(--koperasi-warning); border-color: var(--koperasi-warning); color: var(--text-dark); }
.btn-warning:hover { background-color: #ffb300; border-color: #ffb300; color: var(--text-dark); }
.btn-info { background-color: var(--koperasi-info); border-color: var(--koperasi-info); color: #fff; }
.btn-info:hover { background-color: #0aa4c6; border-color: #0aa4c6; }
.btn-outline-primary { border-color: var(--primary-color); color: var(--primary-color); }
.btn-outline-primary:hover { background-color: var(--primary-color); color: #fff; }

.form-control, .form-select {
    border-radius: 0.375rem;
    border: 1px solid var(--border-color);
    padding: 0.65rem 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    font-size: 0.95rem;
    background-color: var(--bg-white);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-color-rgb), 0.25);
}
.form-control[readonly], .form-control[disabled] {
    background-color: #e9ecef;
    opacity: 1;
}
.form-label {
    font-weight: 500;
    margin-bottom: .5rem;
    color: #495057;
    font-size: 0.95rem;
}
.input-group-text {
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-right: none;
    border-radius: 8px 0 0 8px;
}
.input-group .form-control {
    border-left: none;
    border-radius: 0 8px 8px 0;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border-radius: 0.375rem;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border-color);
    font-size: 0.85rem;
}
.table {
    background-color: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    overflow: hidden;
}
.table thead th {
    background-color: var(--bg-soft-gray);
    border-bottom-width: 2px;
    border-top-width: 0;
    font-weight: 600;
    color: var(--text-dark);
    font-family: var(--font-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.table td, .table th {
    vertical-align: middle;
    padding: 0.85rem;
}
.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: var(--bg-soft-gray);
}
.table-hover > tbody > tr:hover > * {
    --bs-table-accent-bg: #f0f4f8;
}

.badge {
    padding: 0.45em 0.75em;
    font-size: 0.78em;
    font-weight: 600;
    border-radius: 0.3rem;
}
.bg-success-light { background-color: rgba(var(--koperasi-success-rgb), 0.1) !important; color: var(--koperasi-success) !important; border: 1px solid rgba(var(--koperasi-success-rgb), 0.3);}
.bg-danger-light { background-color: rgba(var(--koperasi-danger-rgb), 0.1) !important; color: var(--koperasi-danger) !important; border: 1px solid rgba(var(--koperasi-danger-rgb), 0.3);}
.bg-warning-light { background-color: rgba(var(--koperasi-warning-rgb), 0.1) !important; color: #664d03 !important; border: 1px solid rgba(var(--koperasi-warning-rgb), 0.3);}
.bg-info-light { background-color: rgba(var(--koperasi-info-rgb), 0.1) !important; color: var(--koperasi-info) !important; border: 1px solid rgba(var(--koperasi-info-rgb), 0.3);}

.alert {
    border-radius: 0.375rem;
    padding: 1rem 1.25rem;
    border-width: 0;
    border-left-width: 4px;
}
.alert-success { border-left-color: var(--koperasi-success); background-color: rgba(var(--koperasi-success-rgb), 0.1); color: var(--koperasi-success-dark); }
.alert-danger { border-left-color: var(--koperasi-danger); background-color: rgba(var(--koperasi-danger-rgb), 0.1); color: #842029;}
.alert-warning { border-left-color: var(--koperasi-warning); background-color: rgba(var(--koperasi-warning-rgb), 0.1); color: #664d03;}
.alert-info { border-left-color: var(--koperasi-info); background-color: rgba(var(--koperasi-info-rgb), 0.1); color: #055160;}
.alert-dismissible .btn-close {
    padding: 0.9rem 1.1rem;
}

/* Styling Baru untuk Halaman Login */
body.login-page {
    --login-bg-color-1: #e0eafc;
    --login-bg-color-2: #cfdef3;
    background-color: #e0eafc;
    background-image:
        linear-gradient(var(--login-bg-color-2) 2px, transparent 2px),
        linear-gradient(90deg, var(--login-bg-color-2) 2px, transparent 2px),
        linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px);
    background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;
    background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: var(--font-primary);
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 420px; /* Sedikit lebih lebar */
    background-color: rgba(255, 255, 255, 0.95); /* Sedikit transparan */
    backdrop-filter: blur(10px); /* Efek glassmorphism */
    -webkit-backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px; /* Lebih rounded */
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.2); /* Shadow lebih halus */
    text-align: center;
}
.login-box .logo { margin-bottom: 20px; }
.login-box .logo i { font-size: 3rem; color: var(--primary-color); }
.login-box h2 {
    margin-bottom: 25px; color: var(--text-dark);
    font-weight: 600; font-size: 1.6rem;
}
.input-group-login { position: relative; margin-bottom: 20px; }
.input-group-login .form-control { padding-left: 45px; height: 48px; font-size: 0.95rem; border-radius: 0.375rem; }
.input-group-login .icon {
    position: absolute; left: 15px; top: 50%;
    transform: translateY(-50%); color: var(--text-muted);
    font-size: 1.05rem; transition: color 0.3s;
}
.input-group-login .form-control:focus ~ .icon { color: var(--primary-color); }
.btn-login-submit {
    background-color: var(--primary-color); color: white;
    padding: 10px 20px; border: none; border-radius: 0.375rem;
    cursor: pointer; width: 100%; font-size: 1rem; font-weight: 600;
    transition: background-color 0.3s, transform 0.1s;
    text-transform: uppercase; letter-spacing: 0.8px;
}
.btn-login-submit:hover { background-color: var(--primary-dark); }
.btn-login-submit:active { transform: scale(0.98); }
.login-box .alert { text-align: left; margin-bottom: 20px; font-size: 0.85rem; }

.hero-section {
    background: var(--gradient-hero);
    padding: 1rem 0 5rem;
    color: white;
    position: relative;
}
.hero-title {
    font-family: var(--font-primary);
    font-size: clamp(1.5rem, 3.8vw, 2.3rem);
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: white;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    line-height: 1.1;
}
.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 400;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 0;
    opacity: 0.95;
}

.search-controls-container {
    background: var(--bg-white);
    border-radius: 20px;
    padding: 1.5rem;
    margin: -3.5rem auto 2rem;
    max-width: 900px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 10;
}
.search-input, .filter-select {
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    background: var(--bg-white);
    transition: 0.3s ease;
}
.search-input:focus, .filter-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
    outline: none;
}
.input-group .search-input {
    border-right: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.search-btn {
    background: var(--gradient-button-primary);
    border: none;
    border-radius: 0 50px 50px 0;
    color: white;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    transition: 0.3s ease;
}
.input-group .search-input:focus + .search-btn,
.search-btn:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-1px);
}
.btn-reset-filter {
    border-radius: 25px;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.product-card {
    background: var(--bg-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    height: 100%;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}
.product-image-container {
    position: relative;
    width: 100%;
    height: 220px;
    background: var(--bg-light);
    overflow: hidden;
    cursor: pointer;
}
.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 1rem;
    transition: transform 0.4s ease;
}
.product-card:hover .product-image {
    transform: scale(1.05);
}
.category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(var(--primary-color-rgb), 0.9);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
    backdrop-filter: blur(10px);
}
.product-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.product-info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}
.product-title {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    padding-right: 0.5rem;
    max-width: calc(100% - 70px);
}
.product-title a {
    color: inherit;
    text-decoration: none;
}
.product-title a:hover {
    color: var(--primary-color);
}
.product-price-display {
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1rem;
    text-align: right;
    white-space: nowrap;
    line-height: 1.4;
}
.product-stock {
    font-size: 0.8rem;
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--text-medium);
}
.stock-available { color: var(--accent-color); }
.stock-low { color: #f59e0b; }
.stock-out { color: #ef4444; }
.product-actions {
    margin-top: auto;
}
.add-to-cart-btn {
    background: var(--gradient-button-primary);
    border: none;
    border-radius: 15px;
    color: white;
    padding: 0.75rem 1rem;
    width: 100%;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}
.add-to-cart-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
.add-to-cart-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: var(--shadow-xl);
}
.modal-header {
    background: var(--gradient-primary);
    color: white;
    border-radius: 20px 20px 0 0;
    padding: 1.5rem;
    border-bottom: none;
}
.modal-title {
    font-family: var(--font-primary);
    font-weight: 600;
}
.btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}
.btn-close:hover { opacity: 1; }
.modal-body .product-image-modal {
    max-height: 350px;
    object-fit: contain;
    border-radius: 15px;
    width: 100%;
}
.modal-body .variant-selector select {
    border-radius: 10px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.quantity-control {
    background: var(--bg-light);
    border-radius: 15px;
    padding: 0.25rem;
    display: flex;
    align-items: center;
}
.quantity-btn {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    width: 35px;
    height: 35px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-medium);
    transition: all 0.2s ease;
    font-weight: 500;
}
.quantity-btn:hover:not(:disabled) {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}
.quantity-btn:disabled { cursor: not-allowed; opacity: 0.6; }
.quantity-input {
  flex-grow: 1;
  text-align: center;
  border: none;
  background: transparent;
  font-weight: 500;
  color: var(--text-dark);
  width: 60px;
  min-width: 60px;
  font-size: 1rem;
}

.cart-modal .modal-header .modal-title i { margin-right: 0.5rem; }
.cart-modal .cart-item-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 10px;
    background: var(--bg-light);
    padding: 0.5rem;
    margin-right: 1rem;
}
.cart-modal .qty-input {
    max-width: 70px;
    text-align: center;
    border-radius: 8px;
}
.cart-modal .item-name { font-weight: 500; color: var(--text-dark); }
.cart-modal .item-price-small { font-size: 0.85rem; color: var(--text-medium); }
.cart-modal .btn-remove-item { font-size: 0.8rem; color: #ef4444; text-decoration: none; }
.cart-modal .btn-remove-item:hover { text-decoration: underline; }
.cart-modal .cart-total-price { color: var(--primary-dark); }

body.page-checkout {
    padding-top: 0;
}
.checkout-header-bar {
    background: var(--gradient-checkout-header);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2.5rem;
    text-align: center;
}
.checkout-header-bar h2 {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 2.25rem;
    letter-spacing: -0.5px;
}
.checkout-header-bar .lead {
    font-size: 1.1rem;
    opacity: .9;
    margin-bottom: 0;
}
.checkout-header-bar .store-icon {
    font-size: 2rem;
    margin-bottom: .5rem;
    display: block;
}
.card-checkout-form, .card-order-summary {
    background-color: var(--bg-white);
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    overflow: hidden;
}
.card-checkout-form .card-header,
.card-order-summary .card-header {
    background-color: var(--primary-color);
    color: white;
    border-bottom: none;
    font-family: var(--font-primary);
    font-weight: 500;
    font-size: 1.2rem;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
}
.card-checkout-form .card-header i,
.card-order-summary .card-header i {
    margin-right: .75rem;
    font-size: 1.1em;
}
.form-section-title {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--primary-color);
    display: inline-block;
}
.btn-place-order {
    background: var(--gradient-place-order-btn);
    border: none;
    color: white;
    font-family: var(--font-primary);
    font-weight: 600;
    padding: .85rem 1.5rem;
    font-size: 1.15rem;
    border-radius: 50px;
    transition: all .3s ease;
    box-shadow: 0 4px 15px rgba(var(--koperasi-success-rgb), .3);
}
.btn-place-order:hover, .btn-place-order:focus {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--koperasi-success-rgb), .4);
}
.btn-place-order i { margin-right: .5rem; }
.order-summary-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
}
.order-summary-item:last-child { border-bottom: none; }
.order-summary-item img {
    width: 60px; height: 60px; object-fit: cover;
    border-radius: 8px; margin-right: 15px;
}
.summary-item-name { font-weight: 500; color: var(--text-dark); }
.summary-item-qty { font-size: .9em; color: var(--text-medium); }
.summary-item-price { font-weight: 500; color: var(--text-dark); }
.summary-total {
    padding: 1.25rem 1.5rem;
    background-color: var(--bg-soft-gray);
}
.summary-total-label {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 1.15rem;
}
.summary-total-value {
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--primary-color);
}
.link-back-to-catalog {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}
.link-back-to-catalog:hover { text-decoration: underline; }

.footer-modern {
    background-color: var(--bg-soft-gray);
    color: var(--text-medium);
    padding: 1.5rem 0;
    margin-top: 4rem;
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    min-height: 60px;
}
.footer-modern .footer-copyright {
    margin-bottom: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}
.footer-modern .footer-copyright a.footer-link {
    color: var(--text-dark);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}
.footer-modern .footer-copyright a.footer-link:hover {
    color: var(--primary-color, #007bff);
}
.footer-checkout {
    padding-top: 2rem;
    padding-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-medium);
}
.footer-checkout a {
    color: var(--text-medium);
    text-decoration: none;
}
.footer-checkout a:hover {
    color: var(--primary-color);
}

@media (max-width: 767px) {
    .footer-modern {
        padding: 1rem 0;
        margin-top: 2rem;
        text-align: center;
    }
    .footer-modern .text-md-start,
    .footer-modern .text-md-end {
        text-align: center !important;
    }
    .footer-modern .col-md-6 {
        margin-bottom: 0.5rem;
    }
    .footer-modern .col-md-6:last-child {
        margin-bottom: 0;
    }
}
.footer-modern .row {
    align-items: center;
    justify-content: center;
}
.footer-center-only {
    text-align: center !important;
}
.footer-center-only .col-md-6 {
    text-align: center !important;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-medium);
}
.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}
.empty-state h5 {
    font-family: var(--font-primary);
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.fade-in {
    animation: fadeInAnimation 0.5s ease-in-out forwards;
    opacity: 0;
}
@keyframes fadeInAnimation {
    0% { opacity: 0; transform: translateY(10px); }
    100% { opacity: 1; transform: translateY(0); }
}

.floating-cart-btn,
.floating-search-btn {
  position: fixed;
  width: 47px;
  height: 47px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-lg);
  z-index: 1045;
  color: white !important;
  text-decoration: none;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.floating-cart-btn {
  bottom: 25px;
  right: 25px;
  background-color: var(--primary-color);
}
.floating-cart-btn:hover {
  background-color: var(--primary-dark);
  transform: scale(1.08);
  box-shadow: var(--shadow-xl);
}
.cart-badge-floating {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 18px;
  height: 18px;
  background: #ff4757;
  color: white;
  border-radius: 50%;
  border: 2px solid var(--bg-white);
  font-size: 0.65rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 1px;
}
.floating-search-btn {
  bottom: calc(25px + 47px + 12px);
  right: 25px;
  background-color: var(--secondary-color);
  z-index: 1044;
}
.floating-search-btn:hover {
  background-color: var(--koperasi-secondary-darken);
  transform: scale(1.08);
  box-shadow: var(--shadow-xl);
}

@media (max-width: 768px) {
    .hero-section { padding: 2rem 0 4rem; }
    .hero-title { font-size: 1.6rem; }
    .hero-subtitle { font-size: 1rem; }
    .page-header h1 { font-size: 1.5rem; }
    .checkout-header-bar h2 { font-size: 1.75rem; }
    .checkout-header-bar .lead { font-size: 1rem; }
}

@media (max-width: 576px) {
    body { font-size: 0.9rem; padding-top: 65px; }
    .navbar-modern { height: 65px; }
    .hero-section { padding: 1.5rem 0 4rem; }
    .search-controls-container { padding: 1.5rem; margin: -3rem auto 2rem; }
    .product-content { padding: 1rem; }
    .product-title { font-size: 0.95rem; }
    .modal-header, .modal-footer { padding: 1rem; }
    .cart-modal .qty-input { max-width: 60px; }
    .footer-modern { font-size: 0.85rem; padding: 1.5rem 0 1rem 0; }
    .page-header h1 { font-size: 1.3rem; }
    .card-checkout-form .card-body, .card-order-summary .card-body { padding: 1rem; }
    .form-section-title { font-size: 1.1rem; }
    .btn-place-order { font-size: 1rem; padding: .75rem 1.25rem; }
    .summary-total-label { font-size: 1rem; }
    .summary-total-value { font-size: 1.15rem; }
    .checkout-header-bar h2 { font-size: 1.5rem; }
    .checkout-header-bar .lead { font-size: 0.9rem; }
}