/* Reusable UI Components for LUNAYA E-commerce */

/* Card Styles (General) */
.card {
    background-color: var(--color-pure-white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Product Card Specifics (already in styles.css, but can be extended here) */
.product-card {
    text-align: left;
}

.product-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-size: 1.4em;
    margin-bottom: 10px;
}

.product-info .price {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--color-golden-champagne);
}

/* Category Card Specifics (already in styles.css, but can be extended here) */
.category-card {
    position: relative;
    overflow: hidden;
}

.category-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-pure-white);
    font-size: 1.8em;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
}

/* Testimonial Card Specifics (already in styles.css, but can be extended here) */
.testimonial-card {
    text-align: center;
}

/* Form Elements (General) */
.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 1em;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.form-control:focus {
    border-color: var(--color-golden-champagne);
    outline: none;
    box-shadow: 0 0 0 3px rgba(217, 184, 167, 0.3);
}

/* Modals/Popups (General structure for newsletter, size guide, etc.) */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--color-pure-white);
    margin: auto;
    padding: 30px;
    border-radius: 10px;
    position: relative;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    transform: translateY(50px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-close-btn {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.modal-close-btn:hover,
.modal-close-btn:focus {
    color: var(--color-midnight-grey);
    text-decoration: none;
    cursor: pointer;
}

/* Specific Modal Styles (e.g., Size Guide) */
#sizeGuideModal .modal-content {
    text-align: center;
}

#sizeGuideModal table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#sizeGuideModal th, #sizeGuideModal td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

#sizeGuideModal th {
    background-color: var(--color-rosy-sand);
    color: var(--color-midnight-grey);
}

/* Cookie Consent Banner (already in styles.css, but can be extended here) */
.cookie-consent-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-consent-banner p {
    flex: 1;
    margin-right: 20px;
}

.cookie-consent-banner .cookie-buttons {
    display: flex;
    gap: 10px;
}

/* Pagination (for shop page) */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.pagination a {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    border: 1px solid var(--color-golden-champagne);
    border-radius: 5px;
    color: var(--color-golden-champagne);
    text-decoration: none;
    transition: all 0.3s ease;
}

.pagination a.active,
.pagination a:hover {
    background-color: var(--color-golden-champagne);
    color: var(--color-pure-white);
}

/* Social Media Icons */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.social-icons a {
    font-size: 1.8em;
    color: var(--color-midnight-grey);
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--color-golden-champagne);
}

/* Back-to-top button */
#backToTopBtn {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed/sticky position */
    bottom: 30px; /* Place the button at the bottom of the page */
    right: 30px; /* Place the button at the right side */
    z-index: 99; /* Make sure it does not overlap */
    border: none; /* Remove borders */
    outline: none; /* Remove outline */
    background-color: var(--color-golden-champagne); /* Set a background color */
    color: var(--color-pure-white); /* Text color */
    cursor: pointer; /* Add a mouse pointer on hover */
    padding: 15px; /* Some padding */
    border-radius: 50%; /* Rounded corners */
    font-size: 1.5em; /* Increase font size */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#backToTopBtn:hover {
    background-color: var(--color-lavender-pastel);
    transform: translateY(-3px);
}