/* =============================================
   Timika Teknik AC - Custom Stylesheet
   Theme: White & Blue (batamapparel-inspired)
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Rajdhani:wght@500;600;700&display=swap');

:root {
    --primary: #0057B8;
    --primary-dark: #003D8C;
    --primary-light: #EBF3FF;
    --primary-mid: #2D7DD2;
    --accent: #00A3E0;
    --accent-hover: #007AB8;
    --bg: #FFFFFF;
    --bg-light: #F4F8FF;
    --bg-section: #EEF4FF;
    --text-dark: #0D1B3E;
    --text-body: #374151;
    --text-dim: #6B7A9E;
    --text-light: #FFFFFF;
    --border: rgba(0, 87, 184, 0.15);
    --border-soft: rgba(0, 87, 184, 0.08);
    --shadow: 0 4px 24px rgba(0, 87, 184, 0.10);
    --shadow-lg: 0 12px 40px rgba(0, 87, 184, 0.16);
    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --container-width: 1200px;
    --header-offset: 80px;
    /* default: no topbar (768–991px) */
    --transition: all 0.3s ease;
    --radius: 10px;
    --radius-lg: 16px;
}

/* Desktop: topbar (~34px) + navbar (~74px) both inside fixed header */
@media (min-width: 992px) {
    :root {
        --header-offset: 108px;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--text-body);
    font-family: var(--font-body);
    line-height: 1.65;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-dark);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-padding {
    padding: 5rem 0;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary) !important;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--primary);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    border-radius: 6px;
    border: 2px solid var(--primary);
    transition: var(--transition);
    text-transform: uppercase;
}

.btn:hover {
    background: transparent;
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 87, 184, 0.25);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn-white {
    background: #fff;
    color: var(--primary);
    border-color: #fff;
}

.btn-white:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.88rem;
}

/* ===== FADE-IN ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.75s ease, transform 0.75s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== HEADER / NAVBAR ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-soft);
    transition: box-shadow 0.3s ease, padding 0.3s ease;
}

header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 87, 184, 0.12);
}

.topbar {
    background: var(--primary);
    color: #fff;
    padding: 0.4rem 0;
    font-size: 0.8rem;
    display: none;
}

@media(min-width:992px) {
    .topbar {
        display: block;
    }
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar a {
    color: rgba(255, 255, 255, 0.9);
}

.topbar a:hover {
    color: #fff;
}

.topbar i {
    margin-right: 0.3rem;
}

.navbar-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    gap: 1rem;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.logo-text {
    line-height: 1.15;
}

.logo-text .brand {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logo-text .sub {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-weight: 400;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links>a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-dark);
    padding: 0.4rem 0;
    position: relative;
    transition: color 0.2s;
}

.nav-links>a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-links>a:hover,
.nav-links>a.active {
    color: var(--primary);
}

.nav-links>a:hover::after,
.nav-links>a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cart-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
    text-decoration: none;
}

.cart-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #EF4444;
    color: #fff;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-light);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem 0.9rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
    transition: var(--transition);
}

.user-menu-btn:hover {
    border-color: var(--primary);
    background: #fff;
}

.nav-toggle {
    display: none;
    background: none;
    border: 2px solid var(--border);
    border-radius: 8px;
    width: 42px;
    height: 42px;
    color: var(--primary);
    font-size: 1.1rem;
    align-items: center;
    justify-content: center;
}

/* Mobile nav */
.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid var(--border-soft);
    padding: 1rem 1.5rem;
    background: #fff;
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark);
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border-soft);
    transition: color 0.2s;
}

.mobile-nav a:hover {
    color: var(--primary);
}

/* ===== HERO ===== */
.hero {
    position: relative;
    margin-top: var(--header-offset);
    width: 100%;
    aspect-ratio: 16/7;
    max-height: calc(100vh - var(--header-offset));
    min-height: 460px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.hero-slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100%;
    opacity: 0;
    transition: opacity 0.9s ease;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 30, 80, 0.75) 0%, rgba(0, 30, 80, 0.25) 60%, transparent 100%);
    pointer-events: none;
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    z-index: 2;
    padding: 2rem;
}

.hero-text {
    max-width: 600px;
    color: #fff;
}

.hero-text .eyebrow {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.75rem;
    display: block;
}

.hero-text h1 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 1rem;
}

.hero-text p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    max-width: 480px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    display: flex;
    gap: 0.6rem;
    z-index: 3;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.3);
    transition: var(--transition);
}

.hero-dots button.active {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.3);
}

.hero-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    font-size: 1.1rem;
}

/* ===== FEATURES STRIP ===== */
.features-strip {
    background: var(--primary);
    padding: 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    transition: background 0.2s;
}

.feature-item:last-child {
    border-right: none;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.feature-item .f-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.feature-item h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.1rem;
}

.feature-item p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
}

/* ===== SECTION HEADINGS ===== */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header .eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-light);
    padding: 0.3rem 1rem;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.section-header p {
    color: var(--text-dim);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== PRODUCT TABS ===== */
.product-tabs-section {
    background: var(--bg-light);
}

.tab-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.tab-pill {
    padding: 0.55rem 1.4rem;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 30px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-body);
    cursor: pointer;
    transition: var(--transition);
}

.tab-pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.tab-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ===== PRODUCT GRID ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 87, 184, 0.06);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0, 87, 184, 0.2);
}

.product-card .card-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-light), #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.product-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-card:hover .card-img img {
    transform: scale(1.06);
}

.product-card .card-img .no-img {
    color: var(--primary);
    font-size: 3.5rem;
    opacity: 0.4;
}

.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card .card-body {
    padding: 1.2rem 1.3rem 1.4rem;
}

.product-card h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text-dark);
    line-height: 1.3;
}

.product-card .card-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
    font-family: var(--font-heading);
}

.product-card .card-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-add-cart {
    flex: 1;
    padding: 0.6rem 1rem;
    background: var(--primary);
    color: #fff;
    border: 2px solid var(--primary);
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-add-cart:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-detail-link {
    width: 40px;
    height: 40px;
    border: 2px solid var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-detail-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ===== BESTSELLER SECTION ===== */
.bestseller-section {
    background: #fff;
}

.bestseller-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.bestseller-card {
    display: flex;
    gap: 1.2rem;
    align-items: center;
    background: var(--bg-light);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    transition: var(--transition);
}

.bestseller-card:hover {
    box-shadow: var(--shadow);
    border-color: rgba(0, 87, 184, 0.2);
}

.bestseller-card .bs-img {
    width: 90px;
    height: 90px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bestseller-card .bs-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bestseller-card .bs-img .no-img {
    color: var(--primary);
    font-size: 2rem;
    opacity: 0.5;
}

.bestseller-card .bs-info h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.3rem;
}

.bestseller-card .stars {
    color: #F59E0B;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.bestseller-card .bs-price {
    font-weight: 800;
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
}

.bs-badge {
    font-size: 0.72rem;
    color: var(--text-dim);
}

.bs-badge span {
    color: var(--primary);
    font-weight: 700;
}

/* ===== TESTIMONIAL ===== */
.testimonial-section {
    background: var(--bg-section);
}

.testimonial-track-wrap {
    overflow: hidden;
}

.testimonial-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.5s ease;
}

.testimonial-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    min-width: calc(33.333% - 1rem);
    flex-shrink: 0;
    box-shadow: 0 2px 12px rgba(0, 87, 184, 0.06);
    position: relative;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 4rem;
    line-height: 1;
    color: var(--primary-light);
    font-family: Georgia, serif;
    font-weight: 700;
}

.testimonial-card .stars {
    color: #F59E0B;
    margin-bottom: 1rem;
}

.testimonial-card p {
    color: var(--text-body);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
    font-style: italic;
}

.testimonial-card .reviewer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reviewer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.reviewer-info strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--text-dark);
}

.reviewer-info span {
    font-size: 0.8rem;
    color: var(--text-dim);
}

.testi-nav {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.testi-nav button {
    width: 44px;
    height: 44px;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
    font-size: 1rem;
    transition: var(--transition);
}

.testi-nav button:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-mid) 100%);
    color: #fff;
    text-align: center;
    padding: 5rem 0;
}

.cta-section h2 {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 1rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.82);
    max-width: 550px;
    margin: 0 auto 2rem;
    font-size: 1.05rem;
}

.cta-wa {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.9rem 2.2rem;
    background: #25D366;
    color: #fff;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: 2px solid #25D366;
}

.cta-wa:hover {
    background: transparent;
    color: #25D366;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
}

/* ===== FOOTER ===== */
footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.85);
}

.footer-main {
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
}

.footer-col h5 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    margin-bottom: 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.12);
}

.footer-col p {
    font-size: 0.88rem;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.6rem;
}

.footer-col ul li a {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.2s;
}

.footer-col ul li a:hover {
    color: #fff;
    padding-left: 4px;
}

.footer-contact-item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
    align-items: flex-start;
}

.footer-contact-item i {
    color: var(--accent);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.footer-contact-item span {
    font-size: 0.88rem;
}

.social-links {
    display: flex;
    gap: 0.6rem;
    margin-top: 1.2rem;
}

.social-link {
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.95rem;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.footer-bottom p {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
}

/* ===== FLOATING BUTTONS ===== */
.cart-float {
    position: fixed;
    bottom: 6rem;
    right: 1.5rem;
    width: 52px;
    height: 52px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    box-shadow: 0 4px 20px rgba(0, 87, 184, 0.35);
    z-index: 500;
    transition: var(--transition);
}

.cart-float:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.cart-float .cart-float-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    background: #EF4444;
    color: #fff;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    display: none;
}

.back-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    box-shadow: var(--shadow);
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.back-top.show {
    opacity: 1;
    visibility: visible;
}

.back-top:hover {
    background: var(--primary-dark);
}

/* ===== SPINNER ===== */
#page-spinner {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.4s, visibility 0.4s;
}

#page-spinner.hide {
    opacity: 0;
    visibility: hidden;
}

.spinner-ring {
    width: 50px;
    height: 50px;
    border: 4px solid var(--primary-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== TOAST ===== */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
}

.toast-msg {
    background: var(--primary);
    color: #fff;
    padding: 0.8rem 1.6rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 6px 24px rgba(0, 87, 184, 0.3);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s, transform 0.3s;
    margin-top: 0.5rem;
    white-space: nowrap;
}

.toast-msg.show {
    opacity: 1;
    transform: translateY(0);
}

/* ===== PAGE HEADER ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
    padding: calc(var(--header-offset) + 2.5rem) 0 2.5rem;
    text-align: center;
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 0.5rem;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    align-items: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumb a:hover {
    color: #fff;
}

.breadcrumb span {
    color: #fff;
}

/* ===== PRODUCT DETAIL PAGE ===== */
.detail-section {
    padding: 4rem 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.detail-img {
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 380px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-img .no-img {
    color: var(--primary);
    font-size: 5rem;
    opacity: 0.3;
}

.detail-info .category-tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.8rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.8rem;
}

.detail-info h1 {
    font-family: var(--font-heading);
    font-size: 2rem;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.detail-info .detail-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 1rem 0 1.2rem;
    font-family: var(--font-heading);
}

.detail-info .desc-text {
    color: var(--text-body);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.detail-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ===== CART PAGE ===== */
.cart-section {
    padding: 3rem 0 5rem;
}

.cart-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 2.5rem;
    align-items: start;
}

.cart-table-wrap {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-table th {
    background: var(--primary);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem 1.2rem;
    text-align: left;
}

.cart-table td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
}

.cart-table tr:last-child td {
    border-bottom: none;
}

.cart-item-img {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--primary-light);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
}

.cart-price {
    font-weight: 700;
    color: var(--primary);
    font-family: var(--font-heading);
}

.qty-ctrl {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.qty-ctrl button {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--primary);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.qty-ctrl button:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.qty-ctrl span {
    min-width: 28px;
    text-align: center;
    font-weight: 700;
}

.btn-remove {
    background: none;
    border: none;
    color: #EF4444;
    font-size: 1rem;
    padding: 0.3rem;
    transition: transform 0.2s;
}

.btn-remove:hover {
    transform: scale(1.2);
}

.cart-summary {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: calc(var(--header-offset) + 1rem);
}

.cart-summary h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid var(--border-soft);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.9rem;
    font-size: 0.95rem;
}

.summary-row.total {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary);
    font-family: var(--font-heading);
    padding-top: 1rem;
    border-top: 2px solid var(--border-soft);
    margin-top: 0.5rem;
}

.cart-empty {
    text-align: center;
    padding: 4rem 1rem;
}

.cart-empty i {
    font-size: 4rem;
    color: var(--primary-light);
    margin-bottom: 1rem;
}

/* ===== CHECKOUT PAGE ===== */
.checkout-section {
    padding: 3rem 0 5rem;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 2.5rem;
    align-items: start;
}

.form-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.form-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

.form-group label sup {
    color: #EF4444;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-body);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 87, 184, 0.12);
}

.form-control::placeholder {
    color: #B0BCCC;
}

textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.payment-opt {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.payment-opt:has(input:checked),
.payment-opt.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.payment-opt input {
    accent-color: var(--primary);
}

.payment-opt label {
    font-weight: 600;
    cursor: pointer;
}

.order-summary-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: calc(var(--header-offset) + 1rem);
}

.order-item-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-soft);
}

.order-item-row:last-of-type {
    border-bottom: none;
}

.order-item-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: var(--primary-light);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== SERVICES (All Products) PAGE ===== */
.services-section {
    background: var(--bg-light);
    padding: 3rem 0 5rem;
}

.filter-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

/* ===== AUTH PAGES ===== */
.auth-section {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    display: flex;
    align-items: center;
    padding: calc(var(--header-offset) + 2rem) 1.5rem 3rem;
}

.auth-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    max-width: 440px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
}

.auth-card .auth-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-card h2 {
    font-family: var(--font-heading);
    text-align: center;
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

.auth-card .auth-sub {
    text-align: center;
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-dim);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
}

/* ===== DASHBOARD ===== */
.dash-layout {
    display: flex;
    min-height: 100vh;
    margin-top: var(--header-offset);
}

.dash-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--primary-dark);
    padding: 2rem 0;
    position: sticky;
    top: var(--header-offset);
    height: calc(100vh - var(--header-offset));
    overflow-y: auto;
}

.dash-sidebar .sidebar-logo {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.dash-sidebar .sidebar-logo p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    margin-top: 0.3rem;
}

.dash-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.5rem;
    color: rgba(255, 255, 255, 0.75);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.dash-nav a:hover,
.dash-nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    padding-left: 1.8rem;
}

.dash-nav a i {
    width: 18px;
}

.dash-content {
    flex: 1;
    background: var(--bg-light);
    padding: 2rem;
    min-width: 0;
}

.dash-header {
    margin-bottom: 2rem;
}

.dash-header h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    text-transform: uppercase;
}

.dash-header p {
    color: var(--text-dim);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-soft);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.stat-card .stat-val {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.dash-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-soft);
    margin-bottom: 1.5rem;
}

.dash-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid var(--border-soft);
}

.dash-card-header h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    text-transform: uppercase;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
}

.dash-table th {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dim);
    font-weight: 600;
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 2px solid var(--border-soft);
}

.dash-table td {
    padding: 0.8rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-soft);
}

.dash-table tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-pending {
    background: #FEF3C7;
    color: #D97706;
}

.badge-proses {
    background: #DBEAFE;
    color: #1D4ED8;
}

.badge-selesai {
    background: #D1FAE5;
    color: #065F46;
}

.badge-dibatalkan {
    background: #FEE2E2;
    color: #DC2626;
}

/* ===== SEARCH MODAL ===== */
.search-overlay {
    position: fixed;
    inset: 0;
    z-index: 1500;
    background: rgba(0, 20, 60, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: calc(var(--header-offset) + 2rem);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.search-overlay.open {
    opacity: 1;
    visibility: visible;
}

.search-box {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    width: min(640px, 90vw);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    gap: 0.75rem;
}

.search-box input {
    flex: 1;
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ===== ALERT ===== */
.alert {
    padding: 0.9rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.alert-danger {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bestseller-grid {
        grid-template-columns: 1fr;
    }

    .testimonial-card {
        min-width: calc(50% - 0.75rem);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cart-grid,
    .checkout-grid {
        grid-template-columns: 1fr;
    }

    .cart-summary,
    .order-summary-card {
        position: static;
    }

    .dash-layout {
        flex-direction: column;
    }

    .dash-sidebar {
        width: 100%;
        height: auto;
        position: static;
    }
}

@media (max-width: 768px) {
    :root {
        --header-offset: 64px;
    }

    .nav-links,
    .nav-actions .btn {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    /* Navbar mobile adjustments */
    .navbar-main {
        gap: 0.4rem;
        padding: 0.6rem 0;
    }

    .logo-text .brand {
        font-size: 1.1rem;
    }

    .logo-text .sub {
        display: none;
        /* Hide subtext to save space */
    }

    .nav-actions {
        gap: 0.4rem;
    }

    .user-menu-btn {
        padding: 0.35rem 0.5rem;
        gap: 0.3rem;
    }

    .user-menu-btn .user-initials {
        display: none;
        /* Hide initials on mobile to prevent squishing */
    }

    /* ===== HERO MOBILE FIX ===== */
    .hero {
        aspect-ratio: unset;
        height: auto;
        /* tinggi mengikuti konten */
        min-height: unset;
        max-height: none;
    }

    .hero-content {
        position: relative;
        /* bukan absolute, agar tinggi hero mengikuti konten */
        inset: unset;
        display: flex;
        align-items: flex-start;
        padding: 2.5rem 1.25rem 2.5rem;
    }

    /* hero-slider tetap full di belakang */
    .hero-slider {
        position: absolute;
        inset: 0;
        min-height: 100%;
    }

    .hero-text {
        max-width: 100%;
    }

    .hero-text .eyebrow {
        font-size: 0.7rem;
        margin-bottom: 0.5rem;
    }

    .hero-text h1 {
        font-size: clamp(1.65rem, 7vw, 2.1rem);
        margin-bottom: 0.75rem;
    }

    .hero-text p {
        font-size: 0.92rem;
        margin-bottom: 1.25rem;
        max-width: 100%;
    }

    .hero-cta {
        flex-direction: column;
        gap: 0.65rem;
    }

    .hero-cta .btn,
    .hero-cta .cta-wa {
        width: 100%;
        text-align: center;
        justify-content: center;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    /* ===== FEATURES 2x2 ===== */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonial-card {
        min-width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cart-table th:nth-child(3),
    .cart-table td:nth-child(3) {
        display: none;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .bestseller-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-item {
        padding: 1rem 0.75rem;
        gap: 0.6rem;
    }

    .feature-item .f-icon {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
        flex-shrink: 0;
    }

    .feature-item h4 {
        font-size: 0.85rem;
    }

    .feature-item p {
        font-size: 0.72rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .tab-pills {
        gap: 0.3rem;
    }

    .tab-pill {
        padding: 0.45rem 1rem;
        font-size: 0.85rem;
    }
}
