/* Collection Hero */
.collection-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    text-align: center;
    padding: 120px 20px 80px;
    margin-top: 80px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.collection-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.collection-hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Categories Navigation */
.categories-nav {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 80px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.categories-list {
    display: flex;
    overflow-x: auto;
    padding: 15px 0;
    margin: 0;
    list-style: none;
    scrollbar-width: none; /* Firefox */
}

.categories-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.categories-list li {
    margin-right: 20px;
    white-space: nowrap;
}

.categories-list a {
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.categories-list a.active,
.categories-list a:hover {
    background-color: #2c3e50;
    color: white;
}

/* Products Grid */
.products-section {
    padding: 60px 0;
}

#productsGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

@media (min-width: 1200px) {
    #productsGrid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1199px) and (min-width: 768px) {
    #productsGrid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 479px) {
    #productsGrid {
        grid-template-columns: 1fr;
    }
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 0;
    padding-bottom: 100%; /* Makes the image square */
    position: relative;
    overflow: hidden;
}

.product-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    color: #333;
    flex-shrink: 0;
    line-height: 1.3;
}

.product-info p {
    margin: 0 0 10px;
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    display: -webkit-box;
    display: -ms-flexbox;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    -ms-flex-direction: column;
    flex-direction: column;
    overflow: hidden;
    flex-grow: 1;
}

.product-price {
    font-weight: 600;
    color: #8b5a2b;
    font-size: 1rem;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.size-variants {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-top: 5px;
    font-weight: normal;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: white;
    border-radius: 10px;
    margin: 40px auto;
    position: relative;
    animation: modalFadeIn 0.3s ease;
    overflow: hidden;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #6c757d;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #2c3e50;
}

.modal-body {
    display: flex;
    flex-direction: column;
}

.modal-image-container {
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.modal-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.modal-details {
    padding: 30px;
}

.modal-details h2 {
    margin-top: 0;
    color: #2c3e50;
    font-size: 1.8rem;
}

.modal-details p {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Specifications Styles */
.specifications {
    margin-top: 20px;
    padding: 20px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.specifications strong {
    display: block;
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
}

.specifications ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.specifications li {
    padding: 5px 0;
    color: #6c757d;
    line-height: 1.6;
}

.specifications li strong {
    display: inline;
    color: #495057;
    font-size: 1rem;
    margin-right: 5px;
}

.size-selector {
    margin: 25px 0;
}

.size-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: #2c3e50;
}

.size-selector select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 1rem;
    color: #495057;
    background-color: #fff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.size-selector select:focus {
    border-color: #2c3e50;
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
}

.price-container {
    margin: 20px 0;
}

.price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.action-btn i {
    margin-right: 10px;
    font-size: 1.1rem;
}

.action-btn.shopee {
    background-color: #EE4D2D;
    color: white;
}

.action-btn.tokopedia {
    background-color: #03AC0E;
    color: white;
}

.action-btn.tiktok {
    background-color: #000000;
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive Styles */
@media (min-width: 768px) {
    .modal-body {
        flex-direction: row;
    }
    
    .modal-image-container {
        width: 50%;
        height: auto;
        min-height: 500px;
        border-radius: 0;
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
    }
    
    .modal-details {
        width: 50%;
        padding: 40px;
    }
}

@media (max-width: 767px) {
    .collection-hero {
        padding: 100px 20px 60px;
    }
    
    .collection-hero h1 {
        font-size: 2.2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .modal-content {
        margin: 20px auto;
    }
    
    .modal-details {
        padding: 20px;
    }
    
    .action-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .action-btn {
        flex: 1 0 calc(50% - 6px);
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .collection-hero h1 {
        font-size: 1.8rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .action-btn {
        flex: 1 0 100%;
    }
}
