/* ====================================
   1. RESET DAN FONT DASAR
   ==================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    color: #1a1a1a;
    line-height: 1.6;
    background-color: #ffffff;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Styling Umum */
.uppercase-title {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    margin-bottom: 5px;
}
.subtitle {
    font-size: 14px;
    color: #555;
    margin-bottom: 40px;
}

/* ====================================
   2. HEADER DAN NAVIGASI
   ==================================== */
.header {
    border-bottom: 1px solid #e5e5e5;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: white;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.logo {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 0.2em;
}

.nav-links {
    display: none; 
}

.nav-links a {
    margin: 0 15px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s;
}

.nav-icons button {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 20px;
}

.icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

/* ====================================
   3. LAYOUT UTAMA SHOP PAGE
   ==================================== */
.shop-page-title {
    padding: 60px 0 20px 0;
    text-align: left;
}
.shop-page-title h1 {
    font-size: 36px;
    font-weight: 300;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 5px;
}
.shop-page-title p {
    font-size: 14px;
    color: #555;
}

.main-content-grid {
    display: grid;
    grid-template-columns: 1fr; /* 1 kolom untuk mobile */
    gap: 40px;
    padding-bottom: 80px;
}

@media (min-width: 768px) {
    .main-content-grid {
        grid-template-columns: 250px 1fr; /* Sidebar (250px) dan Konten */
    }
}

/* ====================================
   4. SIDEBAR FILTER
   ==================================== */
.filter-sidebar {
    padding-top: 20px;
}

.filter-sidebar h3 {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e5e5e5;
}

.filter-group {
    margin-bottom: 30px;
}

/* Kategori Links */
.category-links a {
    display: block;
    padding: 5px 0;
    font-size: 14px;
    color: #555;
    transition: color 0.2s;
    padding-left: 10px; /* Indentasi agar rapi */
}
.category-links a:hover:not(.active) {
    color: #1a1a1a;
}

/* Style Link Kategori Aktif */
.category-links a.active {
    background-color: #1a1a1a;
    color: white;
    font-weight: 600;
    padding: 5px 10px;
}

/* Dropdown/Select Kategori */
.category-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #1a1a1a;
    background-color: #1a1a1a;
    color: white;
    font-size: 14px;
    appearance: none; 
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23ffffff'%3E%3Cpath d='M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.186 5.757 5.943 4.343 7.357 9.293 12.95z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 16px 16px;
}

/* Range Slider */
.price-range-label {
    font-size: 14px;
    color: #1a1a1a;
    margin-bottom: 10px;
}
.range-slider-input {
    width: 100%;
    height: 5px;
    -webkit-appearance: none;
    background: #dcdcdc;
    outline: none;
    opacity: 0.7;
    -webkit-transition: .2s;
    transition: opacity .2s;
    margin-top: 10px;
}
.range-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    background: #1a1a1a;
    cursor: pointer;
    border-radius: 50%;
}

/* ====================================
   5. PRODUK GRID
   ==================================== */
.product-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.product-count {
    font-size: 14px;
    color: #555;
}

.sort-select {
    padding: 8px 10px;
    border: 1px solid #dcdcdc;
    font-size: 14px;
    color: #555;
    background-color: white;
    cursor: pointer;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 kolom di mobile */
    gap: 20px;
}

@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr); /* 3 kolom di desktop */
    }
}

/* Styling Item Produk */
.product-item {
    cursor: pointer; /* Menunjukkan bahwa item dapat diklik */
}

.product-item img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 3 / 4;
    margin-bottom: 10px;
}

.item-details h3 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
}

.item-details p {
    font-size: 14px;
    font-weight: 600;
}

.item-details .price-old {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
    font-weight: 400;
}

/* ====================================
   6. FOOTER
   ==================================== */
.footer {
    background-color: #f8f8fa; 
    color: #1a1a1a;
    padding: 60px 0 20px 0;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 40px;
    padding-bottom: 50px; 
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr; 
    }
}

.footer-section h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
    color: #1a1a1a; 
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
     color: #555;
     transition: color 0.3s;
}

.footer-section a:hover {
    color: #1a1a1a;
    text-decoration: none;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 0;
}

.social-icons a {
    border: 1px solid #dcdcdc; 
    padding: 5px;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #1a1a1a;
    transition: background-color 0.3s;
}

.social-icons a:hover {
    background-color: #e5e5e5;
}

.social-icons .icon {
    width: 18px;
    height: 18px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5; 
    font-size: 13px;
    color: #555;
}

.footer-section.about p {
    line-height: 1.8;
    color: #555;
}

/* Logika tampilan filter untuk desktop vs mobile */
@media (max-width: 767px) {
    .category-links {
        display: none !important;
    }
    .category-select {
        display: block !important;
    }
}
@media (min-width: 768px) {
    .category-select {
        display: none !important;
    }
    .category-links {
        display: block !important;
    }
}


/* ====================================
   7. MODAL PRODUK DETAIL
   ==================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Overlay semi-transparan */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden; /* Sembunyikan secara default */
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.visible {
    visibility: visible;
    opacity: 1;
}

.modal-content {
    background-color: white;
    width: 90%;
    max-width: 800px;
    border-radius: 0; 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 30px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .modal-content {
        grid-template-columns: 1fr 1fr; /* 2 kolom di desktop */
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #1a1a1a;
}

.modal-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    aspect-ratio: 3 / 4;
}

.modal-details {
    text-align: left;
    padding-top: 20px;
}

.modal-details h2 {
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 5px;
}

.modal-details .price {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.modal-details p {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
}

.variant-group h4 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.size-options button {
    background-color: white;
    border: 1px solid #1a1a1a;
    color: #1a1a1a;
    padding: 8px 15px;
    margin-right: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.size-options button.selected {
    background-color: #1a1a1a;
    color: white;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    margin-top: 20px;
    border: 1px solid #dcdcdc;
    width: fit-content;
}

.quantity-selector button {
    background: none;
    border: none;
    padding: 10px 15px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.quantity-selector button:hover {
    background-color: #f0f0f0;
}

.quantity-selector input {
    width: 40px;
    text-align: center;
    border: none;
    font-size: 16px;
    font-weight: 500;
    padding: 10px 0;
    background: none;
}

.add-to-cart-btn {
    width: 100%;
    background-color: #1a1a1a;
    color: white;
    padding: 12px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    margin-top: 20px;
    transition: background-color 0.3s;
}
.add-to-cart-btn:hover {
    background-color: #333333;
}