/* 
 * DSDIARY Boutique - Shop CSS
 */

.shop-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;
}

.shop-container h1 {
    text-align: center;
    font-size: 38px;
    margin-bottom: 50px;
    font-family: var(--font-heading);
    letter-spacing: 3px;
    color: var(--text-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 50px;
}

.product-card {
    background: #121212;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 0;
    padding: 15px;
    text-align: left;
    transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth), min-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    min-height: 460px;
    box-sizing: border-box;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.product-card:hover {
    border-color: rgba(255,255,255,0.3);
    box-shadow: 0 12px 40px rgba(0,0,0,0.7);
}

.product-image {
    width: 100%;
    height: 250px;
    background: #f7f7f7;
    border-radius: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-card:hover .product-image img {
    transform: scale(1.05); /* Soft zoom-in on hover */
}

.product-card h3 {
    font-size: 15px;
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: var(--text-color);
    text-transform: uppercase;
}

.product-card .price {
    font-family: var(--font-heading);
    font-size: 18px;
    color: var(--text-color);
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.product-card .description {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    font-weight: 300;
    line-height: 1.5;
    height: 38px; /* Standardize description area to 2 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex-grow: 1; /* Pushes action to bottom */
}

.product-action {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

/* Elegant checkbox styling */
.product-action input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1px solid #c0c0c0;
    cursor: pointer;
    position: relative;
    outline: none;
    transition: var(--transition-smooth);
}

.product-action input[type="checkbox"]:checked {
    background-color: #ffffff;
    border-color: #ffffff;
}

.product-action input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 3px;
    height: 6px;
    border: solid #000000;
    border-width: 0 1px 1px 0;
    transform: rotate(45deg);
}

.product-action label {
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    user-select: none;
    transition: var(--transition-smooth);
}

.product-action input[type="checkbox"]:checked + label {
    color: var(--text-color);
}

.shop-actions {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.shop-actions #add-to-cart-btn {
    min-width: 250px;
}

#selected-count {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
}

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .shop-container {
        padding: 30px 14px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    
    .shop-container h1 {
        font-size: 24px;
        margin-bottom: 24px;
        letter-spacing: 2px;
    }

    .product-info {
        padding: 12px 10px;
    }

    .product-info h3 {
        font-size: 11px;
        letter-spacing: 1px;
    }

    .product-price {
        font-size: 12px;
    }
    
    .product-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .shop-container {
        padding: 24px 10px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .product-image {
        height: 180px;
    }

    .product-info {
        padding: 10px 8px;
    }
}

/* Sleek Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #121212;
    border: 1px solid #333333;
    width: 100%;
    max-width: 800px;
    position: relative;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 20px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    transition: all 0.2s ease;
    outline: none;
    z-index: 100;
    border-radius: 50%;
}

.modal-close-btn:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
}

@media (max-width: 768px) {
    .modal-overlay {
        padding: 12px;
    }

    .modal-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .modal-content {
        padding: 24px 16px 20px 16px;
        max-height: 88vh;
        border-radius: 0;
    }

    .modal-close-btn {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 18px;
        z-index: 100;
    }

    .modal-image-col {
        max-height: 240px;
    }

    .modal-image-col img {
        max-height: 240px;
        object-fit: contain;
    }
}

.modal-image-col {
    width: 100%;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #222222;
}

.modal-image-col img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 400px;
}

.modal-info-col {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.modal-info-col h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    letter-spacing: 2px;
    margin-bottom: 5px;
    text-transform: uppercase;
    color: #ffffff;
}

.modal-style-code {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.modal-price {
    font-family: var(--font-heading);
    font-size: 20px;
    color: #ffffff;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.modal-description {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-sizes-section {
    margin-bottom: 25px;
    font-size: 13px;
}

.modal-sizes-section strong {
    color: #ffffff;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 11px;
    margin-right: 8px;
}

.modal-sizes-section span {
    color: var(--text-muted);
    letter-spacing: 1px;
}

.modal-details-section {
    border-top: 1px solid #222222;
    padding-top: 20px;
}

.modal-details-section h4 {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #ffffff;
    margin-bottom: 10px;
}

#modal-product-details-content {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Smoothly expanding size container */
.product-size-container {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.3s ease;
    margin: 0;
    padding: 0;
}

.product-card.selected .product-size-container {
    max-height: 50px;
    opacity: 1;
    margin-top: 5px;
    margin-bottom: 15px;
}
