/* General Body and Base Styles */
body {
    font-family: 'Lato', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    color: #333;
    background-color: #f8f8f8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: #222;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Header */
header {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-weight: 700;
    color: #555;
    transition: color 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: #ffd700;
}

/* Buttons (General Style) */
.btn {
    display: inline-block;
    background-color: #ffd700;
    color: #333;
    padding: 12px 25px;
    border-radius: 5px;
    text-transform: uppercase;
    font-weight: 700;
    transition: background-color 0.3s ease, color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1em;
    text-align: center;
}

.btn:hover {
    background-color: #e0b800;
    color: #000;
}

/* Hero Section */
.hero {
    background: url('../images/hero-bg.jpg') no-repeat center center/cover;
    color: #fff;
    text-align: center;
    padding: 100px 20px;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #fff;
}

.hero p {
    font-size: 1.3em;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Products Grid (Home Page & Shop Page) */
.products-grid {
    padding: 60px 0;
    text-align: center;
}

.products-grid h2 {
    font-size: 2.5em;
    margin-bottom: 40px;
    color: #333;
}

.product-grid-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-item {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.product-item .product-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.product-item img {
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.product-item h3 {
    font-size: 1.5em;
    margin: 10px 0;
    color: #444;
}

.product-item .product-price {
    font-size: 1.2em;
    font-weight: 700;
    color: #666;
    margin-bottom: 15px;
}

/* Carousel specific styles (for product detail pages) */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto 15px;
    overflow: hidden;
    border-radius: 8px;
}

.carousel-images {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
    height: 200px;
}

.carousel-images img {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin-bottom: 0;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1.2em;
    z-index: 10;
}

.carousel-btn.prev-btn {
    left: 10px;
}

.carousel-btn.next-btn {
    right: 10px;
}

/* Buttons on Product Detail Pages (Buy Now & Add to Cart) */
.product-item .btn {
    width: calc(50% - 10px);
    margin-top: 10px;
    padding: 10px 15px;
    font-size: 0.95em;
    display: inline-block;
}

.product-item .buy-now-btn {
    background-color: #ffd700;
    color: #333;
    margin-right: 5px;
}

.product-item .buy-now-btn:hover {
    background-color: #e0b800;
}

.product-item .add-to-cart-btn {
    background-color: #555;
    color: #fff;
    margin-left: 5px;
}

.product-item .add-to-cart-btn:hover {
    background-color: #333;
}

/* Share Options */
.share-options {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    text-align: center;
}

.share-options p {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

.share-options .share-btn {
    display: inline-block;
    margin: 0 8px;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.share-options .share-btn img {
    width: 32px;
    height: 32px;
    vertical-align: middle;
    border-radius: 4px;
}

.share-options .share-btn:hover {
    transform: translateY(-2px);
}

/* About Us Section */
#about {
    background-color: #f0f0f0;
    padding: 60px 0;
    text-align: center;
}

#about h2 {
    font-size: 2.5em;
    margin-bottom: 30px;
    color: #333;
}

#about p {
    font-size: 1.1em;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 15px auto;
    color: #555;
}

/* Contact Us Section */
#contact {
    padding: 60px 0;
    text-align: center;
}

#contact h2 {
    font-size: 2.5em;
    margin-bottom: 30px;
    color: #333;
}

#contact p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #555;
}

.contact-form {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.form-group {
    flex: 1 1 calc(50% - 10px);
    min-width: 250px;
}

.form-group-full {
    flex: 1 1 100%;
}

.contact-form label.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: #999;
}

.contact-form textarea {
    resize: vertical;
}

.contact-form .btn {
    width: 100%;
    margin-top: 10px;
    padding: 15px 25px;
    font-size: 1.1em;
}

/* Modal Specific Styles (Popup forms like Buy Now, Order) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
    align-items: center;
    justify-content: center;
    -webkit-animation: fadeIn 0.3s;
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    text-align: center;
    -webkit-animation: slideIn 0.3s;
    animation: slideIn 0.3s;
}

@-webkit-keyframes fadeIn {
    from {opacity: 0}
    to {opacity: 1}
}

@keyframes fadeIn {
    from {opacity: 0}
    to {opacity: 1}
}

@-webkit-keyframes slideIn {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

@keyframes slideIn {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    line-height: 1;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

.modal-content .form-group,
.modal-content .form-group-full {
    margin-bottom: 15px;
    flex: 1 1 100%;
    text-align: left;
}

.modal-content input[type="text"],
.modal-content input[type="email"],
.modal-content input[type="tel"],
.modal-content textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.95em;
    box-sizing: border-box;
}

.modal-content .btn {
    width: 100%;
    margin-top: 10px;
    padding: 12px 20px;
    font-size: 1em;
}

#orderSuccessMessage {
    margin-top: 20px;
    padding: 15px;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
}

#orderSuccessMessage h3 {
    color: #155724;
    margin-top: 0;
}

/* Cart Page Styling (cart.html) */
.cart-section {
    padding: 60px 0;
    text-align: center;
}

.cart-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5em;
    margin-bottom: 40px;
    color: #333;
}

#cart-items-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
}

.cart-item-details {
    flex-grow: 1;
    text-align: left;
}

.cart-item-details h4 {
    margin: 0 0 5px 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.2em;
    color: #333;
}

.cart-item-details p {
    margin: 0;
    color: #666;
}

.cart-item-price {
    font-weight: 700;
    font-size: 1.1em;
    color: #333;
    width: 100px;
    text-align: right;
}

.remove-item-btn {
    background: none;
    border: none;
    color: #f00;
    font-size: 1.8em;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 5px;
    line-height: 1;
}

.remove-item-btn:hover {
    color: #c00;
}

#cart-summary {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    text-align: right;
}

.cart-total {
    font-size: 1.5em;
    margin-bottom: 20px;
    color: #000;
}

.cart-total span {
    font-weight: 700;
    color: #222;
}

#cart-summary .btn {
    width: auto;
    margin-left: 10px;
    display: inline-block;
}

.proceed-to-buy-btn {
    background-color: #ffd700;
    color: #333;
}

.proceed-to-buy-btn:hover {
    background-color: #e0b800;
}

.clear-cart-btn {
    background-color: #dc3545;
    color: #fff;
}

.clear-cart-btn:hover {
    background-color: #c82333;
}

#empty-cart-message {
    padding: 20px;
    font-size: 1.1em;
    color: #555;
    text-align: center;
}

#empty-cart-message a {
    color: #ffd700;
    text-decoration: none;
    font-weight: bold;
}

/* Footer */
footer {
    background-color: #222;
    color: #f8f8f8;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

footer p {
    margin: 0;
    font-size: 0.9em;
}

/* Follow Us Section */
.follow-us {
    background-color: #fff;
    padding: 40px 0 30px 0;
    text-align: center;
    margin-bottom: 16px;
}
.follow-us h2 {
    color: #222;
    margin-bottom: 10px;
}
.follow-us .social-icons a {
    display: inline-block;
    margin: 0 12px;
    transition: transform 0.2s;
}
.follow-us .social-icons a:hover {
    transform: scale(1.15);
}
.follow-us .social-icons img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }

    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 5px 15px;
    }

    .hero {
        padding: 60px 20px;
        height: auto;
    }

    .hero h1 {
        font-size: 2.5em;
    }

    .hero p {
        font-size: 1em;
    }

    .products-grid h2,
    #about h2,
    #contact h2,
    .cart-section h2 {
        font-size: 2em;
    }

    .product-grid-items {
        grid-template-columns: 1fr;
    }

    .product-item .btn {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .product-item .btn:last-of-type {
        margin-bottom: 0;
    }

    .share-options {
        padding-top: 10px;
        margin-top: 15px;
    }

    .contact-form {
        gap: 15px;
    }

    .form-group, .form-group-full {
        flex: 1 1 100%;
    }

    .modal-content {
        padding: 20px;
    }

    .modal-content h2 {
        font-size: 1.8em;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding-bottom: 20px;
    }

    .cart-item img {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .cart-item-details {
        width: 100%;
    }

    .cart-item-price {
        width: 100%;
        text-align: left;
        margin-top: 10px;
    }

    .remove-item-btn {
        position: absolute;
        top: 10px;
        right: 10px;
    }

    #cart-summary {
        text-align: center;
    }

    #cart-summary .btn {
        width: 100%;
        margin-left: 0;
        margin-bottom: 10px;
    }
}