/* =========================================
   DASAR
   ========================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #333;
    background: #f5f5f5;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 92%;
    max-width: 1100px;
    margin: auto;
}


/* =========================================
   HEADER
   ========================================= */

.header {
    background: #ffffff;
    border-bottom: 1px solid #eeeeee;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-header {
    width: 92%;
    max-width: 1100px;
    margin: auto;

    min-height: 70px;

    display: flex;
    align-items: center;
    gap: 25px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 62px;
    width: auto;
    display: block;
}

.search {
    flex: 1;

    display: flex;

    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;

    background: #fff;
}

.search input {
    width: 100%;

    padding: 12px 15px;

    border: 0;
    outline: 0;

    font-size: 14px;
}

.search button {
    width: 55px;

    border: 0;

    background: #ee4d2d;
    color: white;

    cursor: pointer;

    font-size: 16px;
}

.cart {
    font-size: 25px;
}

.menu {
    width: 92%;
    max-width: 1100px;
    margin: auto;

    display: flex;
    gap: 28px;

    padding-bottom: 12px;

    font-size: 14px;
}

.menu a {
    color: #555;
}

.menu a:hover {
    color: #ee4d2d;
}


/* =========================================
   BANNER
   ========================================= */

.banner {
    width: 92%;
    max-width: 1100px;

    margin: 25px auto 35px;

    padding: 45px;

    border-radius: 15px;

    background: linear-gradient(
        135deg,
        #fff2ed,
        #ffe0d5
    );

    display: flex;
    align-items: center;
    justify-content: space-between;

    overflow: hidden;
}

.banner-text {
    max-width: 650px;
}

.small-title {
    margin: 0 0 8px;

    font-size: 12px;
    font-weight: bold;

    color: #ee4d2d;

    letter-spacing: 1px;
}

.banner h1 {
    margin: 0 0 15px;

    font-size: clamp(35px, 6vw, 60px);

    line-height: 1.05;

    color: #222;
}

.banner p {
    color: #666;
    line-height: 1.6;
}

.banner-icon {
    font-size: 130px;
    padding: 20px;
}

.button {
    display: inline-block;

    margin-top: 12px;

    padding: 12px 20px;

    border-radius: 8px;

    background: #ee4d2d;
    color: white;

    font-weight: bold;

    transition: 0.2s;
}

.button:hover {
    background: #d94326;
    transform: translateY(-2px);
}


/* =========================================
   JUDUL SECTION
   ========================================= */

.section-title {
    margin: 35px 0 18px;

    display: flex;
    align-items: end;
    justify-content: space-between;
}

.section-title h2 {
    margin: 0;

    font-size: 26px;

    color: #222;
}

.section-title a {
    color: #ee4d2d;
    font-size: 14px;
}

.product-count {
    color: #888;
    font-size: 14px;
}


/* =========================================
   KATEGORI
   ========================================= */

.categories {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 15px;
}

.category {
    background: white;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: 0.2s;
}

.category:hover {
    transform: translateY(-3px);
    border-color: #ee4d2d;
    box-shadow:
        0 5px 15px rgba(0,0,0,0.06);
}

.category:first-line {
    font-size: 30px;
}

.category span {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: #555;
}


/* =========================================
   PRODUK
   ========================================= */

.products {
    display: grid;
    grid-template-columns:
        repeat(4, 1fr);
    gap: 15px;

    padding-bottom: 50px;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eeeeee;
    transition: 0.2s;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 8px 20px rgba(0,0,0,0.08);
}

.product-image {
    position: relative;
    background: #fafafa;
}

.product-image img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.label {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    padding: 5px 8px;
    background: #ee4d2d;
    color: white;
    font-size: 10px;
    font-weight: bold;
    border-radius: 4px;
}

.product-info {
    padding: 15px;
}

.product-info h3 {
    margin: 0 0 7px;
    font-size: 17px;
    color: #222;
}

.product-description {
    margin: 0 0 10px;
    color: #777;
    font-size: 13px;
    line-height: 1.5;
    min-height: 40px;
}

.rating {
    margin-bottom: 8px;
    font-size: 12px;
    color: #f5a623;
}

.rating span {
    color: #999;
}

.price {
    display: block;
    color: #ee4d2d;
    font-size: 20px;
}

.buy-button {
    display: block;
    margin: 0 15px 15px;
    padding: 10px;
    border: 1px solid #ee4d2d;
    border-radius: 6px;
    text-align: center;
    color: #ee4d2d;
    font-size: 13px;
    font-weight: bold;
    transition: 0.2s;
}

.buy-button:hover {
    background: #ee4d2d;
    color: white;
}


/* =========================================
   TENTANG
   ========================================= */

.about {
    margin-top: 20px;
    padding: 55px 0;
    background: white;
    text-align: center;
}

.about h2 {
    margin-top: 0;
    color: #222;
}

.about p {
    max-width: 650px;
    margin: auto;
    color: #777;
    line-height: 1.7;
}


/* =========================================
   FOOTER
   ========================================= */

footer {
    background: #222;
    color: #aaa;
    padding: 30px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.footer-content strong {
    color: white;
}

.footer-content p {
    margin: 5px 0 0;
    font-size: 13px;
}


/* =========================================
   RESPONSIVE - TABLET
   ========================================= */

@media (max-width: 850px) {
    .products {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .categories {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .banner-icon {
        font-size: 90px;
    }
}


/* =========================================
   RESPONSIVE - HP
   ========================================= */

@media (max-width: 600px) {

    .top-header {
        gap: 10px;
    }

    .logo {
        font-size: 18px;
    }

    .cart {
        font-size: 22px;
    }

    .menu {
        gap: 15px;
        overflow-x: auto;
        white-space: nowrap;
    }

    .banner {
        padding: 30px 25px;
        margin-top: 15px;
    }

    .banner-icon {
        display: none;
    }

    .banner h1 {
        font-size: 38px;
    }

    .categories {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .products {
        grid-template-columns:
            repeat(2, 1fr);
        gap: 10px;
    }

    .product-info {
        padding: 12px;
    }

    .product-info h3 {
        font-size: 15px;
    }

    .product-description {
        font-size: 12px;
    }

    .price {
        font-size: 17px;
    }

    .buy-button {
        margin: 0 10px 10px;

        padding: 9px 5px;
    }

    .footer-content {
        flex-direction: column;

        text-align: center;
    }
}
/* Jarak saat menuju bagian dari menu */
#kategori,
#produk,
#tentang {
    scroll-margin-top: 120px;
}


/* =========================================
   DETAIL PRODUK
   ========================================= */
.product-detail {
    width: 92%;
    max-width: 1100px;
    margin: 35px auto 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}


/* =========================================
   FOTO PRODUK
   ========================================= */
.product-photo {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #eeeeee;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.06);
}

.product-photo img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

/* Label TERLARIS */
.product-photo .label {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
    padding: 7px 10px;
    background: #ee4d2d;
    color: white;
    font-size: 11px;
    font-weight: bold;
    border-radius: 5px;
}

/* =========================================
   INFORMASI PRODUK
   ========================================= */
.product-detail-info {
    padding: 10px 0;
}

.product-detail-info h1 {
    margin: 5px 0 10px;
    color: #222;
    font-size: clamp(34px, 5vw, 52px);
    line-height: 1.1;
}

/* Rating */
.rating-detail {
    margin-bottom: 18px;
    color: #f5a623;
    font-size: 14px;
}

.rating-detail span {
    color: #888;
}


/* Harga */
.product-price {
    display: inline-block;
    margin-bottom: 18px;
    padding: 10px 15px;
    background: #fff1ed;
    color: #ee4d2d;
    font-size: 30px;
    font-weight: bold;
    border-radius: 8px;
}


/* Deskripsi */
.product-description-detail {
    color: #666;
    line-height: 1.7;
    font-size: 15px;
    max-width: 550px;
}

/* =========================================
   JUMLAH PRODUK
   ========================================= */
.quantity-box {
    margin-top: 25px;
}

.quantity-box label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold;
    font-size: 14px;
}

.quantity {
    display: flex;
    width: fit-content;
    border: 1px solid #ddd;
    border-radius: 7px;
    overflow: hidden;
    background: white;
}

.quantity button {
    width: 42px;
    height: 42px;
    border: 0;
    background: #f7f7f7;
    color: #333;
    font-size: 20px;
    cursor: pointer;
}

.quantity button:hover {
    background: #eeeeee;
}

.quantity input {
    width: 55px;
    height: 42px;
    border: 0;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 16px;
    outline: none;
}

/* =========================================
   TOMBOL PESAN
   ========================================= */
.action {
    margin-top: 20px;
}

.buy-button-detail {
    width: 100%;
    max-width: 400px;
    padding: 14px 20px;
    border: 0;
    border-radius: 8px;
    background: #ee4d2d;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

.buy-button-detail:hover {
    background: #d94326;
    transform: translateY(-2px);
    box-shadow:
        0 5px 15px rgba(238, 77, 45, 0.25);
}

/* =========================================
   INFORMASI TAMBAHAN
   ========================================= */
.product-info-box {
    margin-top: 25px;
    padding: 18px;
    background: #fafafa;
    border: 1px solid #eeeeee;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.6;
}

.product-info-box > div + div {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eeeeee;
}

.product-info-box strong {
    color: #333;
}

.product-info-box span {
    color: #777;
}

/* =========================================
   LINK KEMBALI
   ========================================= */
.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #ee4d2d;
    font-size: 14px;
    font-weight: bold;
}

.back-link:hover {
    text-decoration: underline;
}

/* =========================================
   DETAIL PRODUK - HP / TABLET
   ========================================= */
@media (max-width: 800px) {
    .product-detail {
        grid-template-columns: 1fr;
        gap: 30px;
        margin-top: 25px;
    }

    .product-detail-info {
        padding-bottom: 20px;
    }

    .product-detail-info h1 {
        font-size: 40px;
    }

    .buy-button-detail {
        max-width: none;
    }
}

/* =========================================
   DETAIL PRODUK - HP KECIL
   ========================================= */
@media (max-width: 500px) {
    .product-detail {
        width: 94%;
    }

    .product-detail-info h1 {
        font-size: 34px;
    }

    .product-price {
        font-size: 25px;
    }

    .product-description-detail {
        font-size: 14px;
    }

    .product-info-box {
        font-size: 12px;
    }
}

/* =========================================
   TANDA PRODUK DITEMUKAN
   ========================================= */
.produk-ditemukan {
    outline: 4px solid #ff9800;
    outline-offset: 5px;
    animation: kedipProduk 1s ease-in-out 3;
}

@keyframes kedipProduk {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.03);
    }
}