/* style.css - Stylesheet utama */
:root {
    --primary: #be185d;
    --primary-light: #fce7f3;
    --secondary: #111827;
    --accent: #db2777;
    --light: #fef7f9;
    --gray: #6b7280;
    --gray-light: #f3f4f6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light);
    color: var(--secondary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary);
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
}

.logo-icon {
    font-size: 2rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--secondary);
    font-weight: 600;
    font-size: 1rem;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.3s;
}

nav a:hover,
nav a.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

.nav-icon {
    margin-right: 8px;
}

.cart-badge {
    background-color: var(--accent);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 50%;
    margin-left: 5px;
}

/* Main Content */
main {
    min-height: calc(100vh - 150px);
    padding: 30px 0;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.page-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary-light);
}

.page-header h2 {
    color: var(--primary);
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.page-header p {
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Landing Page - Hero */
.hero {
    background: linear-gradient(135deg, #f9d5e5 0%, #fef7f9 100%);
    border-radius: 15px;
    padding: 50px 40px;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.hero h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--gray);
    max-width: 700px;
    margin-bottom: 25px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

/* Buttons */
.btn {
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: #9d174d;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(190, 24, 93, 0.2);
}

.btn-secondary {
    background-color: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary-light);
    transform: translateY(-3px);
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #0da271;
    transform: translateY(-3px);
}

.btn-warning {
    background-color: var(--warning);
    color: white;
}

.btn-warning:hover {
    background-color: #d97706;
    transform: translateY(-3px);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    transform: translateY(-3px);
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
}

.product-image {
    height: 220px;
    width: 100%;
    object-fit: cover;
}

.product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--secondary);
    font-weight: 700;
}

.product-category {
    display: inline-block;
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.product-desc {
    color: var(--gray);
    margin-bottom: 20px;
    flex-grow: 1;
    font-size: 0.95rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
}

/* Cart Page */
.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

@media (max-width: 992px) {
    .cart-container {
        grid-template-columns: 1fr;
    }
}

.cart-items {
    background-color: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.cart-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto auto;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--gray-light);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
}

.cart-item-info h4 {
    margin-bottom: 8px;
    color: var(--secondary);
}

.cart-item-price {
    color: var(--primary);
    font-weight: 600;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--gray-light);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
}

.quantity-btn:hover {
    background-color: var(--primary-light);
}

.cart-summary {
    background-color: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    align-self: start;
    position: sticky;
    top: 100px;
}

.cart-summary h3 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-light);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.summary-total {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--secondary);
    padding-top: 15px;
    border-top: 2px solid var(--gray-light);
}

.empty-cart {
    text-align: center;
    padding: 40px;
    color: var(--gray);
}

.empty-cart i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary-light);
}

/* Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
}

.stat-icon.products {
    background-color: var(--primary);
}

.stat-icon.sales {
    background-color: var(--success);
}

.stat-icon.revenue {
    background-color: var(--accent);
}

.stat-icon.orders {
    background-color: var(--warning);
}

.stat-info h3 {
    font-size: 2rem;
    margin-bottom: 5px;
    color: var(--secondary);
}

.stat-info p {
    color: var(--gray);
    font-size: 0.9rem;
}

.dashboard-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    align-items: center;
}

.products-table-container {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: var(--primary);
    color: white;
}

th,
td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

tbody tr:hover {
    background-color: var(--primary-light);
}

.table-actions {
    display: flex;
    gap: 10px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    border-radius: 15px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--primary);
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
}

.close-modal:hover {
    color: var(--danger);
}

.modal-body {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* File Upload Styling */
.file-upload-container {
    border: 2px dashed var(--gray-light);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
}

.file-upload-container:hover {
    border-color: var(--primary);
}

.file-upload-container input[type="file"] {
    display: none;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.file-upload-icon {
    font-size: 2rem;
    color: var(--primary);
}

.file-upload-text {
    color: var(--gray);
}

.image-preview {
    margin-top: 15px;
    display: none;
}

.image-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    object-fit: cover;
}

.image-preview.show {
    display: block;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--gray-light);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Footer */
footer {
    background-color: var(--secondary);
    color: white;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: white;
}

.footer-section p {
    color: #d1d5db;
    margin-bottom: 15px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
}

.social-links a:hover {
    background-color: var(--primary);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .hero {
        padding: 30px 20px;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }

    .cart-item {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 15px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .dashboard-actions {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .table-actions {
        flex-direction: column;
        gap: 5px;
    }
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 1200;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background-color: var(--success);
}

.notification.error {
    background-color: var(--danger);
}

.notification.info {
    background-color: var(--primary);
}

/* WhatsApp Checkout */
.whatsapp-checkout {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid var(--gray-light);
}

.whatsapp-checkout h4 {
    color: var(--secondary);
    margin-bottom: 15px;
}

.whatsapp-checkout p {
    color: var(--gray);
    margin-bottom: 20px;
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-whatsapp:hover {
    background-color: #1da851;
    transform: translateY(-3px);
}

/* Loading */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--primary-light);
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Logout button */
.logout-btn {
    background-color: var(--danger);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.logout-btn:hover {
    background-color: #dc2626;
}