/* ========================
   GLOBAL
======================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: #f0f4f8;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    color: #333;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* ========================
   HEADER
======================== */
header {
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
    color: #fff;
    padding: 20px 15px;
    text-align: center;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 1px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
}

/* ========================
   CONTAINER
======================== */
.container {
    display: flex;
    max-width: 1300px;
    margin: 30px auto;
    gap: 25px;
    flex: 1;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ========================
   MAIN
======================== */
.main {
    flex: 3;
    background: #ffffff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 25px;
    text-align: left;
}

/* ========================
   HALAMAN 404
======================== */
.main h1 {
    font-size: 36px;
    font-weight: 900;
    margin: 0;
    color: #ff4757;
    text-align: center;
}

.main p {
    font-size: 20px;
    margin: 15px 0 30px;
    color: #555;
    text-align: center;
}

.main .btn, .btn-home {
    display: inline-block;
    background: #3742fa;
    color: #fff;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
    text-align: center;
}

.main .btn:hover, .btn-home:hover {
    background: #2f3542;
    transform: translateY(-2px);
}

/* ========================
   HALAMAN STATIS (404 / TERMS / PRIVACY)
======================== */
.main.static-page {
    display: flex;
    flex-direction: column;
    align-items: center;  /* center horizontally */
    justify-content: center;
    text-align: center;
    min-height: 60vh;
    padding: 40px 20px;
    gap: 20px;
}

/* Pastikan heading & tombol tetap rapi */
.main.static-page h1,
.main.static-page p {
    margin: 0;
}

.main.static-page .btn {
    margin-top: 20px;
}


/* ========================
   SIDEBAR
======================== */
.sidebar {
    flex: 1;
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    height: fit-content;
}

/* Sidebar headings */
.sidebar h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #1e90ff;
    border-bottom: 2px solid #1e90ff;
    padding-bottom: 8px;
}

/* Sidebar links */
.sidebar ul li a {
    color: #2f3542;
    font-weight: 500;
    transition: 0.3s;
}

.sidebar ul li a:hover {
    color: #3742fa;
}

/* ========================
   GRID CARD (INDEX)
======================== */
.grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 25px;
}

.card {
    background: #fefefe;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 18px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    flex: 1;
    color: #2f3542;
}

.card-price {
    font-size: 18px;
    color: #ff6b81;
    margin-bottom: 15px;
}

.card a.btn {
    display: block;
    background: #3742fa;
    color: #fff;
    text-align: center;
    padding: 12px 0;
    border-radius: 50px;
    font-weight: 700;
}

.card a.btn:hover {
    background: #2f3542;
}

/* ========================
   ARTIKEL
======================== */
.product-image img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 25px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.product-title {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 15px;
    color: #3742fa;
}

.product-desc {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 25px;
    color: #555;
}

.price {
    font-size: 22px;
    font-weight: 700;
    color: #ff6b81;
    margin-bottom: 20px;
}

/* ========================
   NAV & EXTERNAL LINKS
======================== */
.nav-article a {
    color: #3742fa;
    font-weight: 700;
    transition: 0.3s;
}

.nav-article a:hover {
    color: #2f3542;
}

.external-links a {
    display: inline-block;
    background: #ff4757;
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 5px;
    transition: 0.3s;
}

.external-links a:hover {
    background: #e84118;
}

/* ========================
   PAGINATION
======================== */
.pagination a {
    background: #3742fa;
    color: #fff;
    text-align: center;
    line-height: 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-block;
    transition: all 0.3s ease;
}

.pagination a.active {
    background: #ff4757;
}

.pagination a:hover {
    transform: scale(1.1);
}

/* ========================
   FOOTER
======================== */
footer {
    background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
    color: #fff;
    text-align: center;
    padding: 30px 15px;
    font-size: 15px;
    box-shadow: 0 -4px 8px rgba(0,0,0,0.1);
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
}

footer a {
    color: #ffdd59;
}

footer a:hover {
    text-decoration: underline;
}

/* ========================
   MEDIA QUERIES
======================== */
@media screen and (max-width: 992px) {
    .container {
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        margin: 0 auto;
        padding: 0 15px;
        box-sizing: border-box;
    }
    .main, .sidebar {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 15px;
        box-sizing: border-box;
    }
}

@media screen and (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .product-title {
        font-size: 24px;
    }
    .product-desc {
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .btn, .btn-home, .card a.btn {
        width: 100%;
        box-sizing: border-box;
        padding: 12px;
        font-size: 15px;
    }
    .product-image img {
        width: 100%;
        height: auto;
    }
    .product-title {
        font-size: 20px;
    }
    .product-desc {
        font-size: 14px;
        line-height: 1.5;
    }
}
