/*
 * Store Page Styles - Rosewood Ridge Site
 */

@import url('variables.css');

.store-page {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 1.5rem; /* Add padding to the main store page container */
}

.store-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.store-header h1 {
    color: var(--highlight-color);
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}

.store-header p {
    color: var(--text-secondary-color);
    font-size: 1.2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); /* Responsive grid */
    gap: 2rem; /* Increased gap */
    padding: 1rem 0; /* Add some padding around the grid */
}

.product-card {
    background: var(--gradient-dark); /* Use a gradient for depth */
    border-radius: var(--border-radius-std);
    box-shadow: var(--box-shadow-std);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.4s ease;
    border: 1px solid var(--accent-color);
    opacity: 0; /* For animation */
    transform: translateY(30px); /* For animation */
    animation: fadeInSlideUp 0.6s ease-out forwards;
}

.product-card:hover {
    transform: translateY(-8px); /* More pronounced hover effect */
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5), 0 0 15px var(--glow-color); /* Enhanced shadow */
}

.product-image-container {
    width: 100%;
    height: 220px; /* Slightly taller images */
    overflow: hidden;
    background-color: var(--bg-color-darker); /* Darker placeholder bg */
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image {
    transform: scale(1.1); /* Zoom effect on image */
}

.product-content {
    padding: 1.5rem; /* More padding */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.5rem; /* Larger title */
    color: var(--highlight-color);
    font-weight: 600;
    line-height: 1.3;
}

.product-description {
    margin: 0 0 1.25rem 0;
    font-size: 0.95rem;
    color: var(--text-color);
    line-height: 1.6;
    
    /* CSS Truncation */
    display: -webkit-box;
    -webkit-line-clamp: 6; /* Show 6 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: calc(1.6em * 6); /* Explicit height for 6 lines (line-height * number of lines) */
}

.product-footer {
    margin-top: auto; /* Pushes to the bottom */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.product-price {
    font-size: 1.3rem; /* Larger price */
    font-weight: 700;
    color: var(--bright-accent);
}

.product-buttons {
    display: flex;
    gap: 0.5rem; /* Space between buttons */
}

.product-button {
    padding: 0.6rem 1rem; /* Adjusted padding slightly */
    background-color: var(--accent-color);
    color: var(--text-color);
    border-radius: var(--border-radius-std);
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    border: 1px solid transparent;
    font-size: 0.85rem; /* Slightly smaller font for two buttons */
    text-align: center;
}

.product-button.details-button {
    background-color: var(--bg-color-lighter); /* Different color for details */
    border: 1px solid var(--accent-color);
}
.product-button.details-button:hover {
    background-color: var(--dark-accent);
    color: var(--highlight-color);
}


.product-button.view-button:hover, /* Combined hover for view product */
.product-button:hover { /* General hover for single button case if any */
    background-color: var(--highlight-color);
    color: var(--bg-color-darker);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-light);
    border-color: var(--bright-accent);
}

.no-products-available,
.no-results-message-store {
    text-align: center;
    color: var(--text-secondary-color);
    font-size: 1.2rem;
    padding: 3rem;
    background-color: rgba(0, 0, 0, 0.15);
    border-radius: var(--border-radius-std);
    margin-top: 2rem;
}

/* Animation */
@keyframes fadeInSlideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it's above other content */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay:target, /* For potential future use with URL hash */
.modal-overlay[style*="display: flex"] { /* More robust selector for when shown by JS */
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--gradient-dark);
    padding: 2rem;
    border-radius: var(--border-radius-std);
    box-shadow: var(--box-shadow-std);
    border: 1px solid var(--accent-color);
    width: 90%;
    max-width: 800px; /* Max width of modal */
    max-height: 80vh; /* Max height of modal */
    overflow-y: auto; /* Scroll for long content */
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay[style*="display: flex"] .modal-content {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary-color);
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
}

.modal-close-btn:hover {
    color: var(--highlight-color);
}

#modalProductContent h2,
#modalProductContent h3 {
    color: var(--highlight-color);
    margin-top: 0;
    margin-bottom: 1rem;
}
#modalProductContent p {
    margin-bottom: 1rem;
    line-height: 1.7;
}
#modalProductContent ul,
#modalProductContent ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}
#modalProductContent li {
    margin-bottom: 0.5rem;
}
#modalProductContent a {
    color: var(--bright-accent);
}
#modalProductContent a:hover {
    text-decoration: underline;
}

/* Styles for YouTube button in modal */
.modal-youtube-button-container {
    text-align: center; /* Center the button within this container */
    margin-top: 1.5rem; /* Space above the button */
    padding-top: 1rem; /* Additional space if there's content above */
    border-top: 1px solid rgba(255, 255, 255, 0.1); /* Optional separator line */
}

.modal-youtube-button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #FF0000; /* YouTube Red */
    color: #FFFFFF;
    text-decoration: none;
    border-radius: var(--border-radius-std);
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: var(--box-shadow-light);
}

.modal-youtube-button:hover {
    background-color: #cc0000; /* Darker YouTube Red */
    transform: translateY(-2px);
    text-decoration: none; /* Ensure no underline on hover */
}


/* Custom Scrollbar for Modal Content */
.modal-content::-webkit-scrollbar {
  width: 10px;
}
.modal-content::-webkit-scrollbar-track {
  background: var(--bg-color-darker);
  border-radius: 5px;
}
.modal-content::-webkit-scrollbar-thumb {
  background-color: var(--accent-color);
  border-radius: 5px;
  border: 2px solid var(--bg-color-darker);
}
.modal-content::-webkit-scrollbar-thumb:hover {
  background-color: var(--highlight-color);
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .store-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    .store-header h1 {
        font-size: 2.2rem;
    }
    .store-header p {
        font-size: 1rem;
    }
    .product-title {
        font-size: 1.3rem;
    }
    .product-price {
        font-size: 1.1rem;
    }
    .product-button {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    .product-image-container {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .store-grid {
        grid-template-columns: 1fr; /* Single column */
    }
     .product-image-container {
        height: 180px;
    }
}
