:root {
    --bg: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: rgba(0, 0, 0, 0.08);

    --main-color: #0072FF;
    --main-dark: #005ad1;

    --radius: 14px;
}

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&display=swap');

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    padding-top: 120px;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 14px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 999;
    border-bottom: 1px solid var(--border);
}

/* Topbar */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 13px;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}

.topbar-link {
    text-decoration: none;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s ease;
}

.topbar-link:hover {
    color: var(--main-color);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-label {
    font-weight: 500;
    color: var(--muted);
}

.topbar-social {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: rgba(0, 0, 0, 0.03);
    text-decoration: none;
    transition: 0.2s ease;
}

.topbar-icon:hover {
    color: var(--main-color);
    background: rgba(0, 114, 255, 0.08);
}

/* Header Main */
.header-main {
    display: grid;
    grid-template-columns: 170px auto 260px;
    gap: 20px;
    align-items: center;
    padding: 14px 0;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 44px;
    object-fit: contain;
}
.logo i{
    display: none;
}

/* Search Box */
.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 12px;
    transition: 0.2s ease;
}

.search-box:focus-within {
    border-color: rgba(0, 114, 255, 0.4);
    box-shadow: 0 0 0 4px rgba(0, 114, 255, 0.15);
    background: #fff;
}

.search-icon {
    font-size: 14px;
    color: var(--muted);
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--text);
}

.search-box input::placeholder {
    color: #9ca3af;
}

.search-btn {
    border: none;
    outline: none;
    cursor: pointer;
    padding: 9px 16px;
    border-radius: 12px;
    background: var(--main-color);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s ease;
}

.search-btn:hover {
    background: var(--main-dark);
}

/* Actions */
.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

/* Cart */
.cart-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.04);
    color: var(--text);
    text-decoration: none;
    transition: 0.2s ease;
}

.cart-btn:hover {
    background: rgba(0, 114, 255, 0.12);
    color: var(--main-color);
}

.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--main-color);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: 2px solid #fff;
}

/* Auth Buttons */
.auth-btns {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-auth {
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s ease;
    border: 1px solid transparent;
}

.btn-outline {
    color: var(--main-color);
    border-color: rgba(0, 114, 255, 0.35);
    background: transparent;
}

.btn-outline:hover {
    background: rgba(0, 114, 255, 0.08);
}

.btn-solid {
    background: var(--main-color);
    color: #fff;
}

.btn-solid:hover {
    background: var(--main-dark);
}


/* Cart ====================== */
.cart-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.cart-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    position: relative;
    font-size: 18px;
    padding: 0;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: #e11d48;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
}

.cart-menu {
    position: absolute;
    top: 55px;
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.18);
    overflow: hidden;

    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: 0.2s ease;

    z-index: 9999;
}

.cart-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cart-menu-head {
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-menu-head h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.cart-count {
    font-size: 12px;
    color: #666;
}

.cart-menu-body {
    max-height: 280px;
    overflow-y: auto;
    padding: 12px 16px;
}

.cart-empty {
    margin: 0;
    font-size: 14px;
    color: #777;
    text-align: center;
    padding: 20px 0;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f1f1;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    background: #f5f5f5;
}

.cart-info {
    flex: 1;
}

.cart-info h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.cart-info span {
    font-size: 12px;
    color: #666;
}

.cart-remove {
    border: none;
    background: transparent;
    font-size: 20px;
    cursor: pointer;
    color: #999;
}

.cart-remove:hover {
    color: #e11d48;
}

.cart-menu-footer {
    border-top: 1px solid #eee;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Total Harga */
.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    color: #222;
}

.cart-total span {
    font-weight: 600;
    color: #666;
}

.cart-total strong {
    font-size: 14px;
    color: #111;
}

/* Tombol di footer */
.cart-footer-actions {
    display: flex;
    gap: 10px;
}

.btn-cart-view,
.btn-cart-checkout {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: 0.2s ease;
}

.btn-cart-view {
    background: #f1f1f1;
    color: #333;
}

.btn-cart-view:hover {
    background: #e8e8e8;
}

.btn-cart-checkout {
    background: #0d6efd;
    color: #fff;
}

.btn-cart-checkout:hover {
    background: #0b5ed7;
}




/* Footer ================= */
.footer {
    background: #f9fafb;
    margin-top: 60px;
    padding: 50px 0 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 35px;
    margin-bottom: 35px;
}

.footer-logo {
    height: 40px;
    margin-bottom: 15px;
    object-fit: contain;
}

.footer-title {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 14px;
    color: #111827;
}

.footer-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 15px;
}

.footer-desc.small {
    margin-bottom: 12px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links li a {
    text-decoration: none;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    transition: 0.2s ease;
}

.footer-links li a:hover {
    color: #0072FF;
    padding-left: 3px;
}

/* social */
.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.footer-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.04);
    color: #111827;
    transition: 0.2s ease;
}

.footer-icon:hover {
    background: rgba(0, 114, 255, 0.12);
    color: #0072FF;
}

/* newsletter */
.footer-newsletter {
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    height: 44px;
    margin-top: 10px;
}

.footer-newsletter input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0 14px;
    font-size: 13px;
    color: #111827;
}

.footer-newsletter button {
    width: 52px;
    height: 44px;
    border: none;
    cursor: pointer;
    background: #0072FF;
    color: #fff;
    font-size: 14px;
    transition: 0.2s ease;
}

.footer-newsletter button:hover {
    background: #005ad1;
}

/* contact */
.footer-contact {
    margin-top: 14px;
    font-size: 13px;
    color: #6b7280;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

/* bottom */
.footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #6b7280;
}

.footer-credit {
    font-weight: 500;
}


/* Login Popup */
.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 20px;
}

.login-overlay.show {
    display: flex;
}

.login-box {
    width: 420px;
    max-width: 100%;
    background: #fff;
    padding: 28px 25px;
    border-radius: 14px;
    box-shadow: 0px 15px 50px rgba(0,0,0,0.25);
    position: relative;
    animation: popUp 0.25s ease;
}

@keyframes popUp {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.login-box h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.login-box p {
    margin-top: 8px;
    margin-bottom: 18px;
    font-size: 14px;
    color: #666;
}

.login-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: none;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
    color: #444;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    outline: none;
    font-size: 14px;
}

.form-group input:focus {
    border-color: #0d6efd;
}

.btn-login-submit {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: none;
    background: #0d6efd;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
}

.btn-login-submit:hover {
    opacity: 0.9;
}

.login-links {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
    font-size: 13px;
}

.login-links a {
    color: #0d6efd;
    text-decoration: none;
}

.user-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.user-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.user-btn img {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid #eee;
}

.user-menu {
    position: absolute;
    top: 55px;
    right: 0;
    width: 180px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
    overflow: hidden;

    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: 0.2s ease;

    z-index: 9999;
}

.user-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    text-decoration: none;
    border: none;
    width: 100%;
    background: transparent;
    cursor: pointer;
}

.user-menu-item:hover {
    background: #f5f5f5;
}

.logout-btn {
    color: #e11d48;
}



/* Tablet ================================== */
@media(max-width:780px){
    .topbar,
    .logo img {
        display: none;
    }
    .logo{
        text-decoration: none;
    }
    .logo i {
        display: block;
        font-size: 22px;
        color: #0072FF;
        text-decoration: none;
    }
    .header-main{
        grid-template-columns: 40px auto 240px;
    }
    .footer-grid{
        grid-template-columns: repeat(2, 1fr);
    }
}


/* Mobile ==================== */
@media(max-width:580px){
    body{
        padding-top:80px;
    }
    .header-main{
        grid-template-columns: auto 60px;
    }
    .btn-auth.btn-solid,
    .search-box .search-btn,
    .logo, .footer{
        display: none;
    }
}