/* General Body Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

a {
    color: #007bff;
    text-decoration: none;
}

a:hover {
    color: #0056b3;
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header & Navigation */
header {
    background-color: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

nav .logo a {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

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

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

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

nav .cart-icon a {
    font-size: 1.5rem;
    color: #333;
}

/* Mobile Navigation (Hidden by default) */
.mobile-nav-toggle {
    display: none; /* Hidden on desktop */
    font-size: 1.8rem;
    cursor: pointer;
    background: none;
    border: none;
}

/* Main Content Area */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Page Headers (for About, Contact, FAQ etc.) */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.page-header h1 {
    font-size: 2.5rem;
    color: #333;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 2rem 0;
    background-color: #e9ecef; /* Light grey background for hero */
    margin-bottom: 2rem;
}

.hero img {
    margin-bottom: 1rem;
    border-radius: 8px;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #555;
}

.btn, button {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover, button:hover {
    background-color: #0056b3;
    color: #fff;
    text-decoration: none;
}

/* Featured Products & Product Grid */
.featured-products, .collections-showcase, .product-listing {
    padding: 2rem 0;
    text-align: center;
}

.featured-products h2, .collections-showcase h2, .product-listing h2, .why-choose-us h2 {
    margin-bottom: 1.5rem;
    font-size: 2rem;
}

.product-grid, .collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card, .collection-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover, .collection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.product-card img, .collection-card img {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.product-card h3, .collection-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.product-card p { /* Price */
    font-weight: bold;
    color: #007bff;
    margin-bottom: 1rem;
}

/* Collections Showcase */
.collections-showcase .collection-card {
    position: relative; /* For potential overlay text later */
}
.collections-showcase .collection-card h3 {
    font-size: 1.5rem;
}


/* Why Choose Us Section */
.why-choose-us {
    background-color: #f8f9fa;
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
    margin: 2rem 0;
}

/* Footer */
footer {
    background-color: #343a40;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

footer ul {
    list-style: none;
    padding: 0;
    margin-top: 0.5rem;
}

footer ul li {
    display: inline;
    margin: 0 10px;
}

footer ul li a {
    color: #007bff;
    text-decoration: none;
}
footer ul li a:hover {
    text-decoration: underline;
}

/* --- Collections Page (collections.html) --- */
.collection-header {
    text-align: center;
    margin-bottom: 2rem;
}
.collection-header h1 {
    font-size: 2.5rem;
}

.pagination {
    text-align: center;
    margin-top: 2rem;
}

.pagination a {
    margin: 0 5px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #007bff;
    border-radius: 4px;
}

.pagination a.active, .pagination a:hover {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}


/* --- Product Detail Page (product-detail.html) --- */
.product-detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-images .main-image {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.thumbnail-images {
    display: flex;
    gap: 0.5rem;
}

.thumbnail-images img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.thumbnail-images img:hover, .thumbnail-images img.active {
    border-color: #007bff;
}

.product-info h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.product-info .price {
    font-size: 1.5rem;
    color: #007bff;
    font-weight: bold;
    margin-bottom: 1rem;
}

.product-info .short-description {
    margin-bottom: 1.5rem;
    color: #555;
}

.variant-selectors, .quantity-selector {
    margin-bottom: 1rem;
}

.variant-selectors label, .quantity-selector label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: bold;
}

.variant-selectors select, .quantity-selector input[type="number"] {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    max-width: 200px; /* Or adjust as needed */
}

.add-to-cart-btn {
    width: 100%;
    padding: 12px;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.product-long-info .tabs {
    margin-bottom: 1rem;
    border-bottom: 1px solid #ddd;
}

.product-long-info .tab-link {
    background: none;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 1rem;
    margin-right: 5px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.product-long-info .tab-link.active, .product-long-info .tab-link:hover {
    border-bottom-color: #007bff;
    color: #007bff;
}

.product-long-info .tab-content {
    display: none;
    padding: 1rem 0;
}

.product-long-info .tab-content.active {
    display: block;
}

.product-long-info .review {
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}
.product-long-info .review:last-child {
    border-bottom: none;
}
.product-long-info .review h4 {
    margin-bottom: 0.3rem;
}

/* --- About Us Page (about.html) --- */
.about-content .about-section {
    margin-bottom: 2rem;
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.about-content .about-section h2 {
    font-size: 1.8rem;
    color: #007bff;
    margin-bottom: 1rem;
}
.about-content .about-section img {
    border-radius: 8px;
    margin-top: 1rem;
}
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    text-align: center;
}
.team-member img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
}
.team-member h3 {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}
.team-member p {
    font-size: 0.9rem;
    color: #777;
}

/* --- Contact Page (contact.html) --- */
.contact-form-section, .contact-info-section {
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.contact-form-section h2, .contact-info-section h2 {
    font-size: 1.8rem;
    color: #007bff;
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Important for width 100% */
}

.form-group textarea {
    resize: vertical;
}

.contact-info-section ul {
    list-style: none;
    padding: 0;
}
.contact-info-section ul li {
    margin-bottom: 0.5rem;
}

/* --- FAQ Page (faq.html) --- */
.faq-content .faq-item {
    margin-bottom: 1rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.faq-question {
    background-color: #007bff;
    color: white;
    cursor: pointer;
    padding: 15px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px 8px 0 0; /* Rounded top corners */
    transition: background-color 0.3s ease;
}
.faq-question:hover {
    background-color: #0056b3;
}

.faq-question.active + .faq-answer {
    display: block;
}

.faq-answer {
    padding: 15px;
    display: none; /* Hidden by default */
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 8px 8px; /* Rounded bottom corners */
}
.faq-answer p {
    margin: 0;
}

/* --- Cart Page (cart.html) --- */
.cart-items-section {
    margin-bottom: 2rem;
}
.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-radius: 8px;
}

.cart-table th, .cart-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.cart-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}
.cart-table thead th:first-child {
    border-top-left-radius: 8px;
}
.cart-table thead th:last-child {
    border-top-right-radius: 8px;
}

.cart-item-info {
    display: flex;
    align-items: center;
}
.cart-item-info img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    margin-right: 1rem;
    border-radius: 4px;
}
.cart-item-info h4 {
    margin: 0 0 0.2rem 0;
    font-size: 1rem;
}
.cart-item-info p {
    font-size: 0.85rem;
    color: #777;
    margin: 0;
}

.cart-table input[type="number"] {
    width: 60px;
    padding: 5px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.remove-item-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.5rem;
    cursor: pointer;
}
.remove-item-btn:hover {
    color: #c82333;
}

.cart-summary-section {
    display: flex;
    justify-content: flex-end; /* Align summary box to the right */
}

.cart-summary-box {
    width: 100%;
    max-width: 400px; /* Limit width of summary box */
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.cart-summary-box h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
    color: #333;
}
.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}
.summary-row.total-row {
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}
.checkout-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
}
.continue-shopping-link {
    display: block;
    text-align: center;
    color: #007bff;
}

/* --- Checkout Page (checkout.html) --- */
.checkout-content {
    text-align: center;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.checkout-placeholder-form {
    margin-top: 1.5rem;
    border: 1px dashed #ccc;
    padding: 1rem;
    display: inline-block;
    text-align: left;
}
.checkout-placeholder-form h3 {
    margin-top: 0;
}
.checkout-placeholder-form ol {
    margin-bottom: 1.5rem;
}


/* --- Responsive Design --- */

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
    nav ul {
        display: none; /* Hide desktop nav */
        flex-direction: column;
        width: 100%;
        background-color: #fff;
        position: absolute;
        top: 60px; /* Adjust based on header height */
        left: 0;
        padding: 1rem 0;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    nav ul.active {
        display: flex; /* Show mobile nav when active */
    }
    nav ul li {
        margin: 10px 0;
        text-align: center;
    }
    .mobile-nav-toggle {
        display: block; /* Show hamburger icon */
    }

    .product-detail-container {
        grid-template-columns: 1fr; /* Stack product image and info */
    }
    .product-images {
        margin-bottom: 1.5rem;
    }

    .cart-summary-section {
        justify-content: center; /* Center summary box on smaller screens */
    }
    .cart-summary-box {
        max-width: 100%;
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .page-header h1, .collection-header h1 {
        font-size: 2rem;
    }

    .product-grid, .collection-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Slightly smaller cards */
    }

    /* Cart Table adjustments for small screens */
    .cart-table thead {
        display: none; /* Hide table header */
    }
    .cart-table, .cart-table tbody, .cart-table tr, .cart-table td {
        display: block;
        width: 100%;
    }
    .cart-table tr {
        margin-bottom: 1rem;
        border: 1px solid #eee;
        border-radius: 4px;
    }
    .cart-table td {
        text-align: right; /* Align text to the right */
        padding-left: 50%; /* Create space for a label */
        position: relative;
        border-bottom: none; /* Remove default bottom border */
    }
    .cart-table td:before {
        content: attr(data-label); /* Use data-label for pseudo-header */
        position: absolute;
        left: 10px;
        width: calc(50% - 20px);
        padding-right: 10px;
        font-weight: bold;
        text-align: left;
    }
    .cart-item-info {
        flex-direction: column; /* Stack image and text vertically */
        align-items: flex-start; /* Align to left for stacked view */
    }
    .cart-item-info img {
        margin-bottom: 0.5rem;
        width: 60px; /* Smaller image in mobile view */
        height: 60px;
    }
    .cart-table td.cart-item-info:before { /* Adjust label for first cell */
        content: "Product";
    }
     .cart-table td:nth-of-type(2):before { content: "Price"; }
     .cart-table td:nth-of-type(3):before { content: "Quantity"; }
     .cart-table td:nth-of-type(4):before { content: "Total"; }
     .cart-table td:nth-of-type(5):before { content: "Remove"; }

    .cart-table input[type="number"] {
        width: 50px;
    }
    .remove-item-btn {
        float: right; /* Ensure it's easily clickable */
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    nav .logo a {
        font-size: 1.5rem;
    }
    .hero {
        padding: 1.5rem 0;
    }
    .product-grid, .collection-grid {
        grid-template-columns: 1fr; /* Single column for products on very small screens */
    }
    .footer ul li {
        display: block;
        margin: 5px 0;
    }
    .product-detail-container {
        gap: 1rem;
    }
    .product-info h1 {
        font-size: 1.8rem;
    }
}
