/* --- VARIABEL MODERN --- */
:root {
    --primary: #2E7D32;
    --primary-light: #E8F5E9;
    --primary-dark: #1B5E20;
    --accent: #F9A825;
    --dark: #2d3436;
    --gray: #636e72;
    --light: #f9f9f9;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
body { background-color: var(--light); color: var(--dark); padding-top: 80px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* BUTTONS */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; border-radius: 50px;
    text-decoration: none; font-weight: 600;
    transition: all 0.3s ease; border: none; cursor: pointer;
}
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(46, 125, 50, 0.4); }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: var(--white); }
.btn-sm { padding: 8px 20px; font-size: 0.9rem; }
.btn-wa { background: #25D366; color: white; }
.btn-wa:hover { background: #20bd5a; }

/* HEADER */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    position: fixed; width: 100%; top: 0; z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}
nav { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo { display: flex; align-items: center; font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.logo img { height: 50px; width: auto; margin-right: 10px; }
.nav-links { display: flex; list-style: none; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--gray); font-weight: 500; transition: 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }

/* HERO SECTION */
.ecom-hero {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    padding: 80px 0;
    color: white;
    text-align: center;
    margin-bottom: 60px;
    border-radius: 0 0 50px 50px;
}
.ecom-hero h1 { font-size: 2.8rem; margin-bottom: 15px; font-weight: 700; }
.ecom-hero p { font-size: 1.1rem; opacity: 0.9; max-width: 600px; margin: 0 auto; }

/* INFO FEATURES */
.features-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px;
    margin-bottom: 60px;
}
.feature-card {
    text-align: center; padding: 30px; background: var(--white);
    border-radius: var(--radius); box-shadow: var(--shadow);
    transition: 0.3s;
}
.feature-card:hover { transform: translateY(-5px); }
.feature-icon {
    width: 60px; height: 60px; background: var(--primary-light); color: var(--primary);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px; font-size: 1.5rem;
}

/* CATALOG & FILTERS */
.catalog-header { text-align: center; margin-bottom: 40px; }
.filter-tabs {
    display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin-bottom: 40px;
}

/* PRODUCT GRID MODERN */
.shop-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px;
    padding-bottom: 80px;
}

.product-card {
    background: var(--white); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); position: relative; transition: 0.3s;
    display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-8px); box-shadow: 0 15px 40px rgba(0,0,0,0.12); }

.product-img-box {
    height: 250px; overflow: hidden; background: #f1f1f1; position: relative;
}
.product-img-box img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.product-card:hover .product-img-box img { transform: scale(1.08); }

.badge {
    position: absolute; top: 15px; left: 15px;
    padding: 5px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    background: var(--accent); color: var(--dark);
}

.product-info { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.prod-cat { font-size: 0.8rem; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 8px; }
.prod-title { font-size: 1.1rem; font-weight: 600; color: var(--dark); margin-bottom: 10px; line-height: 1.4; }
.prod-desc { font-size: 0.85rem; color: #777; margin-bottom: 20px; line-height: 1.6; flex-grow: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.prod-bottom {
    display: flex; justify-content: space-between; align-items: center; margin-top: auto;
    padding-top: 20px; border-top: 1px solid #eee;
}
.prod-price { font-size: 1.2rem; font-weight: 700; color: var(--primary); }

/* FOOTER */
footer { background: var(--dark); color: #b2bec3; padding: 50px 0; text-align: center; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .ecom-hero h1 { font-size: 2rem; }
    .shop-grid { grid-template-columns: 1fr; }
}

/* USER MENU */
.user-menu { display: flex; align-items: center; gap: 15px; }
.user-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-light); display: flex; align-items: center; justify-content: center; color: var(--primary); font-weight: 600; cursor: pointer; }
.dropdown-menu { position: absolute; top: 100%; right: 0; background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 200px; display: none; z-index: 1001; }
.dropdown-menu.show { display: block; }
.dropdown-item { padding: 12px 20px; text-decoration: none; color: var(--dark); display: block; transition: 0.3s; }
.dropdown-item:hover { background: var(--primary-light); color: var(--primary); }
.dropdown-divider { height: 1px; background: #eee; margin: 8px 0; }

/* MODAL - COMPACT VERSION */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}
.modal.show {
    display: block;
}
.modal-content {
    background-color: var(--white);
    margin: 40px auto;
    padding: 25px;
    border-radius: var(--radius);
    max-width: 450px;
    box-shadow: var(--shadow);
    position: relative;
    animation: modalopen 0.3s;
    max-height: 85vh;
    overflow-y: auto;
}
@keyframes modalopen {
    from {
        opacity: 0;
        transform: translateY(-30px);
        scale: 0.95;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        scale: 1;
    }
}
.close-modal {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--gray);
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s;
}
.close-modal:hover {
    color: var(--dark);
    background: #f5f5f5;
}

/* COMPACT FORM STYLES - HORIZONTAL LAYOUT */
.form-group {
    margin-bottom: 15px;
}

/* Horizontal layout untuk desktop */
.form-horizontal .form-row {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 15px;
    align-items: center;
    margin-bottom: 12px;
}
.form-horizontal .form-row label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--dark);
    margin: 0;
    text-align: right;
    white-space: nowrap;
}
.form-horizontal .form-row input,
.form-horizontal .form-row select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: 0.3s;
}
.form-horizontal .form-row input:focus,
.form-horizontal .form-row select:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.1);
}

/* Vertical layout untuk mobile */
@media (max-width: 480px) {
    .form-horizontal .form-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .form-horizontal .form-row label {
        text-align: left;
        font-size: 0.9rem;
    }
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--dark);
    font-size: 0.9rem;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: 0.3s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.1);
}
.form-group .error {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 4px;
}
.form-group small {
    color: var(--gray);
    font-size: 0.8rem;
    display: block;
    margin-top: 4px;
}

/* BUTTON STYLES */
.btn-submit {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    font-weight: 600;
    margin-top: 10px;
}

/* CHECKBOX STYLES */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 15px 0;
}
.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 4px;
}
.checkbox-group label {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 400;
}
.checkbox-group a {
    color: var(--primary);
    text-decoration: underline;
}

/* MODAL HEADER */
.modal-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-light);
}
.modal-header h2 {
    margin: 0;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
}
.modal-header p {
    margin: 5px 0 0 0;
    color: var(--gray);
    font-size: 0.9rem;
}

/* MODAL FOOTER */
.modal-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: center;
}
.modal-footer a {
    color: var(--primary);
    text-decoration: underline;
    font-size: 0.9rem;
    font-weight: 500;
}

/* SOCIAL LOGIN - COMPACT */
.social-login {
    margin: 20px 0;
    text-align: center;
}
.social-login p {
    margin: 10px 0;
    color: var(--gray);
    font-size: 0.85rem;
}
.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin: 4px;
    transition: 0.3s;
    width: 100%;
    justify-content: center;
}
.google-btn {
    background: #ea4335;
    color: white;
    border: none;
}
.google-btn:hover {
    background: #d33426;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(234, 67, 53, 0.3);
}
.facebook-btn {
    background: #3b5998;
    color: white;
    border: none;
}
.facebook-btn:hover {
    background: #2d4373;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(59, 89, 152, 0.3);
}

/* REMEMBER ME & FORGOT PASSWORD */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 15px 0;
    flex-wrap: wrap;
    gap: 10px;
}
.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}
.remember-me input {
    width: auto;
    margin: 0;
}
.forgot-password a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}
.forgot-password a:hover {
    text-decoration: underline;
}

/* SCROLLBAR STYLING */
.modal-content::-webkit-scrollbar {
    width: 6px;
}
.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 10px;
}
.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ANIMATED PLACEHOLDER */
.form-group input::placeholder,
.form-horizontal .form-row input::placeholder {
    color: #aaa;
    opacity: 1;
    transition: 0.3s;
}
.form-group input:focus::placeholder,
.form-horizontal .form-row input:focus::placeholder {
    color: #ccc;
}

/* TOAST NOTIFICATION */
.toast { position: fixed; top: 20px; right: 20px; background: var(--white); padding: 15px 25px; border-radius: var(--radius); box-shadow: var(--shadow); z-index: 10000; display: none; animation: slidein 0.3s; }
@keyframes slidein { from { transform: translateX(400px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.show { display: block; }
.toast.success { border-left: 5px solid var(--primary); }
.toast.error { border-left: 5px solid #e74c3c; }
.toast-content { display: flex; align-items: center; gap: 10px; }
.toast i { font-size: 1.2rem; }