/* Reusable Components for Elegancia Website */

/* Product Card - detailed styling */
.product-card {
    background-color: var(--color-off-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative; /* For labels */
}

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

.product-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    transition: transform 0.5s ease-in-out;
}

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

.product-info {
    padding: 20px;
}

.product-info h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2em;
    margin-bottom: 8px;
    color: var(--color-text-dark);
    font-weight: 600;
}

.product-info .price {
    font-family: 'Lato', sans-serif;
    font-size: 1.1em;
    color: var(--color-matte-gold);
    font-weight: bold;
}

.product-info .label {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--color-powder-pink);
    color: var(--color-text-dark);
    font-size: 0.8em;
    padding: 5px 10px;
    border-radius: 3px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    color: var(--color-text-dark);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Lato', sans-serif;
    font-size: 1em;
    box-sizing: border-box; /* Include padding in width */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    border-color: var(--color-matte-gold);
    box-shadow: 0 0 8px rgba(184, 134, 11, 0.2);
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Newsletter Popup */
.newsletter-popup {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.newsletter-popup.active {
    opacity: 1;
}

.newsletter-popup-content {
    background-color: var(--color-off-white);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    position: relative;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.newsletter-popup.active .newsletter-popup-content {
    transform: translateY(0);
}

.newsletter-popup-content .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5em;
    color: var(--color-text-dark);
    cursor: pointer;
    transition: color 0.3s ease;
}

.newsletter-popup-content .close-btn:hover {
    color: var(--color-matte-gold);
}

.newsletter-popup-content h2 {
    font-size: 2em;
    color: var(--color-matte-gold);
    margin-bottom: 15px;
}

.newsletter-popup-content p {
    margin-bottom: 25px;
    color: var(--color-text-light);
}

.newsletter-popup-content .form-group {
    margin-bottom: 15px;
}

.newsletter-popup-content .btn {
    width: 100%;
    margin-top: 10px;
}

/* Language Switcher */
.language-switcher {
    margin-left: 20px;
}

.language-switcher select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: var(--color-off-white);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9em;
    color: var(--color-text-dark);
    cursor: pointer;
    appearance: none; /* Remove default arrow */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%20viewBox%3D%220%200%20292.4%20292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2C197.9L159.3%2C69.2c-3.7-3.9-9.2-6.1-14.9-6.1c-5.7%2C0-11.2%2C2.2-14.9%2C6.1L5.4%2C197.9c-7.3%2C7.5-7.3%2C19.8%2C0%2C27.3c7.3%2C7.5%2C19.3%2C7.5%2C26.7%2C0l117.6-119.7l117.6%2C119.7c7.3%2C7.5%2C19.3%2C7.5%2C26.7%2C0C294.3%2C217.7%2C294.3%2C205.4%2C287%2C197.9z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 30px; /* Space for the custom arrow */
}

.language-switcher select:focus {
    outline: none;
    border-color: var(--color-matte-gold);
    box-shadow: 0 0 8px rgba(184, 134, 11, 0.2);
}

/* Star Rating */
.star-rating {
    color: var(--color-matte-gold);
    font-size: 1.2em;
}

.star-rating .fa-star,
.star-rating .fa-star-half-alt,
.star-rating .fa-star-o {
    margin-right: 2px;
}

/* Social Share Buttons */
.social-share {
    margin-top: 20px;
    text-align: center;
}

.social-share a {
    display: inline-block;
    margin: 0 8px;
    font-size: 1.5em;
    color: var(--color-text-dark);
    transition: color 0.3s ease;
}

.social-share a:hover {
    color: var(--color-matte-gold);
}

/* Placeholder for Instagram Feed */
.instagram-feed {
    background-color: var(--color-nude-beige);
    padding: 40px;
    margin-top: 60px;
    border-radius: 8px;
}

.instagram-feed h2 {
    color: var(--color-matte-gold);
    margin-bottom: 30px;
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.instagram-grid img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    transition: transform 0.3s ease;
}

.instagram-grid img:hover {
    transform: scale(1.05);
}