/* ==========================================================================
   GAYA UMUM
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: #ffffff;
    color: #333;
    display: flex;
    flex-direction: column;
}

html, body {
    height: 100%;
}

main {
    flex: 1 0 auto;
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-weight: 600;
    color: #d63384;
}

a {
    text-decoration: none;
    color: #d63384;
}

/* ==========================================================================
   HEADER & NAVIGASI (3 KOLOM)
   ========================================================================== */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between; /* Kunci untuk 3 kolom */
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #d63384;
    text-decoration: none;
}

/* --- Menu Navigasi (Tengah) --- */
.nav-center {
    flex: 1; /* Mengambil ruang sisa di tengah */
    display: flex;
    justify-content: center; /* Menengahkan menu */
}

.nav-center ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-center ul li {
    margin: 0 20px;
}

.nav-center ul li a {
    font-weight: 400;
    color: #333;
    transition: color 0.3s ease;
    text-decoration: none;
}

.nav-center ul li a:hover {
    color: #d63384;
}

/* --- Pencarian & Keranjang (Kanan) --- */
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-form {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 20px;
    overflow: hidden;
}

.search-form input[type="text"] {
    border: none;
    outline: none;
    padding: 8px 12px;
    font-size: 0.9rem;
}

.search-form button {
    border: none;
    background-color: #d63384;
    color: white;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-form button:hover {
    background-color: #b02a5b;
}

.cart-icon {
    background-color: #f8d7da;
    color: #d63384;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */
main {
    min-height: 70vh;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    /* Ganti URL di bawah dengan link langsung gambar dari Google */
    background: linear-gradient(rgba(122, 121, 122, 0.7), rgba(104, 102, 103, 0.7)), url('https://smksponcol.sch.id/wp-content/uploads/2025/03/lapangan-olah-raga-scaled.jpg') no-repeat center center/cover;
    color: white;
    text-align: center;
    padding: 100px 0;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* ==========================================================================
   TOMBOL
   ========================================================================== */
.btn-primary {
    display: inline-block;
    background-color: #fff;
    color: #d63384;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s ease, background-color 0.3s ease;
    text-decoration: none;
}

.btn-primary:hover {
    background-color: #f8d7da;
    transform: translateY(-3px);
}

.btn-secondary {
    display: inline-block;
    background-color: transparent;
    color: #d63384;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid #d63384;
    transition: all 0.3s ease;
    margin-right: 10px;
    text-decoration: none;
}

.btn-secondary:hover {
    background-color: #d63384;
    color: white;
}

/* ==========================================================================
   PAGE TITLE
   ========================================================================== */
.page-title {
    background-color: #f8d7da;
    padding: 40px 0;
    text-align: center;
}

.page-title h1 {
    color: #d63384;
}

/* ==========================================================================
   PRODUK GRID
   ========================================================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 40px 0;
}

.product-card {
    background: #fff;
    border: 1px solid #f8d7da;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    text-align: center;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.product-card img {
    max-width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 15px;
}

.product-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.price {
    font-size: 1.2rem;
    font-weight: 600;
    color: #d63384;
    margin-bottom: 15px;
}

.btn-add-cart {
    display: block;
    background-color: #d63384;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.btn-add-cart:hover {
    background-color: #b02a5b;
}

/* ==========================================================================
   HALAMAN DETAIL PRODUK — Versi Bagus & Modern
   ========================================================================== */

.product-detail-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    padding: 30px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* --- FOTO PRODUK --- */
.product-image {
    flex: 1;
    max-width: 420px;
}

.product-image img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    border-radius: 15px;
    border: 2px solid #eee;
    transition: 0.3s ease;
}

.product-image img:hover {
    transform: scale(1.03);
    border-color: #f2b632;
}

/* --- INFO PRODUK --- */
.product-info {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.product-info h2 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #333;
}

.product-info .price {
    font-size: 26px;
    font-weight: 600;
    color: #f2b632;
    margin-bottom: 10px;
}

.product-info p {
    color: #555;
    line-height: 1.6;
    font-size: 16px;
}

/* --- TOMBOL BELI --- */
.add-to-cart-btn {
    background: #f2b632;
    color: #fff;
    padding: 12px 22px;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    width: fit-content;
    transition: 0.3s;
}

.add-to-cart-btn:hover {
    background: #d89f29;
    transform: translateY(-2px);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .product-detail-wrapper {
        flex-direction: column;
        padding: 20px;
    }

    .product-image {
        max-width: 100%;
    }

    .product-info h2 {
        font-size: 26px;
    }

    .product-info .price {
        font-size: 22px;
    }
}


/* ==========================================================================
   FORM
   ========================================================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.form-group textarea {
    resize: vertical;
}

/* ==========================================================================
   TENTANG KAMI
   ========================================================================== */
.about-content {
    padding: 40px 0;
}

.about-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    background-color: #d63384;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
}

footer p {
    margin-bottom: 5px;
}

/* ==========================================================================
   GAYA KHUSUS HALAMAN ADMIN
   ========================================================================== */
.admin-header {
    background-color: #d63384;
    color: white;
    padding: 15px 0;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header a {
    color: white;
    text-decoration: none;
}

.admin-content {
    padding: 40px 0;
}

.product-table, .orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.product-table th, .product-table td,
.orders-table th, .orders-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.product-table th, .orders-table th {
    background-color: #f8d7da;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.dashboard-card {
    background: white;
    border: 1px solid #f8d7da;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.dashboard-card h3 {
    font-size: 2rem;
    color: #d63384;
    margin: 10px 0;
}

.status-pending { color: #856404; background-color: #fff3cd; padding: 4px 8px; border-radius: 4px; font-size: 0.9em; }
.status-processing { color: #004085; background-color: #cce5ff; padding: 4px 8px; border-radius: 4px; font-size: 0.9em; }
.status-completed { color: #155724; background-color: #d4edda; padding: 4px 8px; border-radius: 4px; font-size: 0.9em; }
.status-canceled { color: #721c24; background-color: #f8d7da; padding: 4px 8px; border-radius: 4px; font-size: 0.9em; }

.action-buttons a {
    margin: 0 10px;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 968px) {
    .nav-center ul li {
        margin: 0 15px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    h1 {
        font-size: 2rem;
    }

    /* Header 3 Kolom -> Bertumpuk */
    header .container {
        flex-direction: column;
        gap: 15px;
    }

    .nav-center {
        order: 3; /* Pindah ke bawah */
    }

    .nav-right {
        order: 2; /* Pindah ke tengah */
        width: 100%;
        justify-content: center;
    }

    .nav-center ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    
    .nav-center ul li {
        margin: 0;
    }

    .search-form {
        max-width: 300px;
    }

    /* Hero */
    .hero {
        padding: 50px 0;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    /* Product Grid */
    .product-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 0;
    }

    /* Product Detail */
    .product-detail-wrapper {
        flex-direction: column;
    }
    
    .product-image {
        max-width: 100%;
        height: 300px;
    }

    /* Tables */
    .product-table, .orders-table {
        width: 100%;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    /* Dashboard */
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons a {
        display: block;
        width: 100%;
        margin-bottom: 10px;
        text-align: center;
    }
}

/* --- Gaya Form Filter --- */
.filter-form {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.filter-form label {
    font-weight: 600;
    color: #495057;
}

.filter-form select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 5px;
}

/* --- Gaya Tambahan --- */
.btn-delete {
    color: #dc3545;
    font-weight: 600;
    text-decoration: none;
}
.btn-delete:hover {
    text-decoration: underline;
}
/* --- CSS LAIN --- */


/* === LETAKKAN INI DI PALING BAWAH === */
.featured-products h2 {
    text-align: center;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 30px;
}

.featured-products {
    margin-top: 50px; /* Ubah angka kalau mau lebih jauh */
}

/* =============================
   SUCCESS PAGE
   ============================= */
.success-section {
    padding: 80px 0;
    display: flex;
    justify-content: center;
    text-align: center;
}

.success-card {
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 15px;
    max-width: 500px;
    width: 100%;
    margin: auto;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    animation: fadeIn 0.6s ease;
}

.success-icon {
    font-size: 60px;
    margin-bottom: 15px;
}

.success-card h1 {
    color: #ff4c8b;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 15px;
}

.success-card p {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
}

.success-card .back-home {
    display: inline-block;
    padding: 12px 22px;
    font-size: 16px;
    border-radius: 8px;
    background: #ff4c8b;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
}

.success-card .back-home:hover {
    background: #e83e79;
    transform: translateY(-2px);
}

/* ANIMASI */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
