/* Shop Specific Styles */
.merchandise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    padding: 20px 0;
}

.merchandise-item {
    border: 1px solid var(--border-color);
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    min-height: 400px; /* Ensure consistent height for items */
}
.merchandise-item:hover {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}
[data-theme="light"] .merchandise-item:hover {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.invisible-merchandise-item {
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
    min-height: 400px; /* Ensure consistent height for items */
}
.merchandise-item:hover {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}
[data-theme="light"] .merchandise-item:hover {
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.item-image-placeholder {
    width: 100%;
    height: 200px; /* Fixed height for image consistency */
    background-color: var(--color-primary); /* Placeholder color */
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-family-header);
    font-size: 1.2em;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    overflow: hidden; /* Ensure text doesn't overflow */
}
/* Style for text inside placeholder */
.item-image-placeholder span {
    padding: 10px;
    box-sizing: border-box;
    text-align: center;
}

.item-name {
    font-family: var(--font-family-header);
    font-size: 1.3em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.item-description {
    font-size: 0.9em;
    margin-bottom: 15px;
    flex-grow: 1; /* Allows description to take available space */
}

.item-price {
    font-family: var(--font-family-header);
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--color-primary);
}

.add-to-cart-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--color-primary);
    padding: 10px 20px;
    cursor: pointer;
    font-family: var(--font-family-body);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    width: 100%; /* Full width button */
    box-sizing: border-box;
}
.add-to-cart-btn:hover {
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

/* Sold Out Button Styling */
.sold-out-btn {
    background-color: #6a6a6a; /* A distinct grey color */
    color: #c0c0c0; /* Lighter text color */
    border: none;
    padding: 10px 20px;
    cursor: not-allowed;
    text-transform: uppercase;
    font-weight: bold;
    width: 100%;
}

.sold-out-btn:hover {
    background-color: #6a6a6a; /* No hover effect to reinforce it's not clickable */
}

/* Cart Summary & Checkout */
.cart-summary {
    text-align: center;
    margin-top: 60px;
    padding: 30px;
    border: 1px solid var(--border-color);
    background-color: var(--color-secondary);
    color: var(--color-primary);
    font-family: var(--font-family-body);
}
.cart-summary h3 {
    margin-top: 0;
    border-bottom: none;
    padding-bottom: 0;
}
.cart-details {
    margin-bottom: 20px;
}
.cart-item-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    font-size: 0.95em;
}
.cart-item-list li {
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}
.cart-total {
    font-family: var(--font-family-header);
    font-size: 1.2em;
    margin-top: 20px;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    display: flex;
    justify-content: space-between;
}

.checkout-btn {
    background-color: var(--color-primary);
    color: var(--color-secondary);
    border: 1px solid var(--color-primary);
    padding: 15px 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: var(--font-family-header);
    font-size: 1.1em;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 30px;
    width: 100%;
    box-sizing: border-box;
}
.checkout-btn:hover {
    background-color: var(--color-secondary);
    color: var(--color-primary);
}

/* Shop Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it's on top of other content */
}

.modal-content {
    background-color: var(--color-secondary);
    color: var(--text-color);
    padding: 30px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.modal-message {
    font-size: 1.1rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    color: var(--text-color);
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--primary-color);
}

/* Responsive Design - Consistent with Société il Noir homepage */
@media (max-width: 768px) {
    h1 { font-size: 2.2em; }
    h2 { font-size: 1.8em; }
    h3 { font-size: 1.3em; }
    blockquote { font-size: 1em; padding: 15px 20px; }

    .merchandise-grid {
        grid-template-columns: 1fr; /* Stack columns on smaller screens */
        gap: 30px;
    }
    .merchandise-item {
        min-height: auto; /* Allow height to adjust */
    }
}

/* Landscape/Portrait adaptation (subtle changes) - Consistent with Société il Noir homepage */
@media screen and (orientation: landscape) and (max-height: 500px) {
    /* Adjustments for very narrow landscape views (e.g., small phones held sideways) */
    .merchandise-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    .merchandise-item {
        min-height: 300px; /* Adjust height for smaller landscape items */
    }
    .item-image-placeholder {
        height: 150px;
    }
}

@media screen and (orientation: portrait) and (max-width: 500px) {
    /* Specific adjustments for smaller portrait views */
    .merchandise-grid {
        gap: 20px;
    }
    .merchandise-item {
        padding: 15px;
    }
    .invisible-merchandise-item {
        display: none;
    }
}
/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    .header-nav {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 974px) {
    .invisible-merchandise-item {
        display: none;
    }
}
