/* Import Fonts */
@import url('https://fonts.googleapis.com/css?family=Space+Grotesk:400,500,600,700|Inter:400,500,600,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Abril+Fatface&family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&family=Syne:wght@400..800&display=swap');
/* Global Overrides for Pages */
body {
    font-family: 'Space Grotesk', sans-serif;
    background-color: #fff;
}

/* Page Header (Mini Hero) */
.page-header {
    background-color: #121212;
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('./images/background.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 140px 20px 60px; /* Top padding clears fixed header */
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: #fff;
}

.page-header p {
    color: #ccc;
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Container Utility */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
}

/* --- About Page --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 80px;
    text-align: left;
}

.about-text h2 {
    color: #8B4513;
    margin-bottom: 20px;
    font-size: 2rem;
}

.about-text p {
    line-height: 1.8;
    color: #444;
    margin-bottom: 20px;
}

.about-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    text-align: center;
    margin-top: 40px;
}

.team-member img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid #8B4513;
}

/* --- Shop Page --- */
.shop-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}
.shop-sidebar {
    flex: 1;
    min-width: 250px;
    position: sticky;
    top: 100px;
    text-align: left;
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    /* border: 1px solid #eee; */
    /* box-shadow: 0 4px 20px rgba(0,0,0,0.05); */
    box-sizing: border-box;
    margin-bottom: 60px;
}
.shop-sidebar h3 {
    margin-top: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
.filter-group {
    margin-bottom: 25px;
}
.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
}
.filter-group input,
.filter-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    appearance: none;
    /* Hide default arrow */
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%238B4513"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    font-family: inherit;
    /* Inherit font */
    font-size: 1rem;
    transition: all 0.3s;
    background-color: #fcfcfc;
}

/* Hover and focus states */
.filter-group select:hover,
.filter-group select:focus {
    border-color: #8B4513;
    outline: none;
    box-shadow: 0 2px 5px rgba(139, 69, 19, 0.2);
}

/* Option styles (optional) */
.filter-group select option {
    background-color: #fff;
    color: #333;
    padding: 8px 12px;
    /* Add padding for better readability */
}
.shop-main {
    flex: 3;
}
/* --- Shop Page --- */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 60px;
}

.product-card {
    /* border: 1px solid #eee; */
    /* border-radius: 12px; */
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    /* background: #fff; */
}

.product-card:hover {
    transform: translateY(-5px);
    /* box-shadow: 0 10px 20px rgba(0,0,0,0.08); */
}

.product-image {
    height: 280px;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 10px;
    text-align: center;
}

.product-price {
    color: #8B4513;
    font-weight: 700;
    font-size: 1.2rem;
    display: block;
    margin: 10px 0;
}

.add-cart-btn {
    background: #121212;
    color: #fff;
    border: none;
    padding: 12px 20px;
    width: 100%;
    cursor: pointer;
    border-radius: 30px;
    font-weight: 600;
    transition: background 0.3s;
}

.add-cart-btn:hover {
    background: #8B4513;
}

.quick-view-btn {
    background: transparent;
    border: 1px solid #121212;
    color: #121212;
    padding: 8px 20px;
    width: 100%;
    margin-bottom: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

/* --- Blog Page --- */
.blog-list {
    max-width: 900px;
    margin: 0 auto 60px;
}

.blog-item {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 50px;
    text-align: left;
}

.blog-thumb {
    flex: 1;
    min-width: 300px;
}

.blog-thumb img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    height: 200px;
}

.blog-content {
    flex: 2;
}

/* Blog Filter Styles */
.blog-filter-container {
    max-width: 900px;
    margin: 0 auto 40px;
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.blog-filter-container input,
.blog-filter-container select {
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s;
    background-color: #fcfcfc;
}

.blog-filter-container input:focus,
.blog-filter-container select:focus {
    outline: none;
    border-color: #8B4513;
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.blog-filter-container input {
    flex: 1;
}

.blog-filter-container select {
    width: 200px;
    cursor: pointer;
    background-color: #fff;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 60px;
}

.pagination button {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.pagination button.active, .pagination button:hover {
    background: #8B4513;
    color: #fff;
    border-color: #8B4513;
}

/* --- Contact Page --- */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 60px;
    margin-bottom: 60px;
    text-align: left;
    align-items: flex-start;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
}

.info-item i {
    font-size: 1.5rem;
    color: #8B4513;
    margin-top: 5px;
}

.contact-info, .contact-form-container {
    flex: 1;
    min-width: 300px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.contact-form-container {
    background: #f9f9f9;
    padding: 40px;
    border-radius: 12px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #8B4513;
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.1);
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: #121212;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #8B4513;
}

#form-status {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    text-align: center;
    display: none;
}

#form-status.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

#form-status.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

@media (max-width: 768px) {
    .about-grid, .blog-item {
        grid-template-columns: 1fr;
        flex-direction: column;
        text-align: center;
    }
    .blog-thumb {
        width: 100%;
    }
    .blog-content {
        width: 100%;
    }
    .blog-filter-container {
        flex-direction: column;
    }
    .blog-filter-container select {
        width: 100%;
    }
    .contact-wrapper {
        flex-direction: column;
    }
    .contact-info, .contact-form-container {
        width: 100%;
        min-width: 0;
    }
    .contact-form-container {
        padding: 20px;
    }
    .shop-wrapper {
        flex-direction: column;
    }
    .shop-sidebar, .shop-main {
        width: 100%;
        min-width: 0;
    }
    .shop-sidebar {
        position: static;
    }
    .shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}


.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.clear-cart-btn {
    background: transparent;
    border: 1px solid #dc3545;
    color: #dc3545;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}
.clear-cart-btn:hover {
    background: #dc3545;
    color: #fff;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}
.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    cursor: pointer;
    border-radius: 50%;
    font-weight: bold;
}

.quantity-btn:hover {
    background: #8B4513;
    color: #fff;
}


/* Utility for Load More */
.hidden-project {
    display: none;
}

.hidden-product {
    display: none;
}

/* signin Page Styles */
.signin-form-container {
    background: #f9f9f9;
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    margin: 40px auto;
}

.signin-form-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

.signin-form-container .form-group {
    margin-bottom: 25px;
}

.signin-form-container .form-links {
    text-align: center;
    margin-top: 20px;
}

.signin-form-container .form-links a {
    margin: 0 10px;
    color: #8B4513;
    text-decoration: none;
}

/* Cart Page Styles */
.cart-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 60px;
}

.cart-main {
    flex: 2;
}

.cart-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.cart-table th {
    background-color: #f8f9fa;
    padding: 18px 20px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: #555;
    border-bottom: 2px solid #eee;
    text-align: left;
}

.cart-table td {
    padding: 20px;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
    color: #333;
}

.cart-table tr:last-child td {
    border-bottom: none;
}

.cart-summary {
    flex: 1;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    position: sticky;
    top: 100px; /* Sticky sidebar */
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.cart-summary h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.cart-summary p {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: #666;
    font-size: 1rem;
}

.cart-summary #total {
    font-weight: 700;
    font-size: 1.3rem;
    color: #121212;
}

.continue-shopping-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background: transparent;
    color: #121212;
    border: 1px solid #121212;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    margin-top: 15px;
    transition: all 0.3s;
}

.continue-shopping-btn:hover {
    background: #121212;
    color: #fff;
}

.remove-btn {
    background: transparent;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s, color 0.2s;
    padding: 8px;
    border-radius: 50%;
}

.remove-btn:hover {
    color: #a71d2a;
    background-color: #fff5f5;
    transform: scale(1.1);
}

/* Modal Actions */
.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.modal-btn {
    padding: 10px 25px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.modal-btn.confirm {
    background-color: #dc3545;
    color: #fff;
}

.modal-btn.confirm:hover {
    background-color: #c82333;
}

.modal-btn.cancel {
    background-color: #e2e6ea;
    color: #333;
}

.modal-btn.cancel:hover {
    background-color: #dbe0e5;
}

@media (max-width: 768px) {
    .cart-wrapper {
        flex-direction: column;
    }
    .cart-main, .cart-summary {
        width: 100%;
        min-width: 0;
    }
    .cart-summary {
        position: static;
    }
    /* Responsive Card Style for Cart Table */
    .cart-table {
        display: block;
        width: 100%;
        background: transparent;
        box-shadow: none;
    }
    .cart-table thead {
        display: none;
    }
    .cart-table tbody {
        display: block;
        width: 100%;
    }
    .cart-table tr {
        display: block;
        background: #fff;
        margin-bottom: 15px;
        border-radius: 12px;
        padding: 15px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.05);
        border: 1px solid #eee;
    }
    .cart-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
        border-bottom: 1px solid #f5f5f5;
        text-align: right;
    }
    .cart-table td:last-child {
        border-bottom: none;
    }
    .cart-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #888;
        font-size: 0.9rem;
    }
    .cart-table td[data-label="Product"]::before {
        display: none; /* Hide label for the product name/image row */
    }
}

/* Product Details Page */
.product-details-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
    align-items: center;
}

.product-details-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.product-details-info {
    text-align: left;
}

.detail-category {
    color: #8B4513;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.product-details-info h2 {
    font-size: 2.5rem;
    margin: 10px 0;
    color: #121212;
}

.detail-price {
    font-size: 1.5rem;
    color: #333;
    font-weight: 500;
    margin-bottom: 25px;
}

.detail-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.detail-actions .quantity-selector {
    margin-bottom: 0;
}

.detail-actions .add-cart-btn {
    position: static;
    width: auto;
    padding: 10px 40px;
    margin: 0;
}

.detail-description {
    color: #666;
    line-height: 1.8;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .product-details-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Product Gallery & Related */
.thumbnail-gallery {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.thumbnail:hover, .thumbnail.active {
    border-color: #8B4513;
}

.related-products-section {
    margin-top: 80px;
    border-top: 1px solid #eee;
    padding-top: 40px;
}

.related-products-section h3 {
    margin-bottom: 30px;
    color: #121212;
}

/* Quick View Modal */
.quick-view-content {
    max-width: 800px;
    width: 90%;
    padding: 0;
    overflow: hidden;
}

.quick-view-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.quick-view-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quick-view-details {
    padding: 40px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Reviews Section */
.reviews-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.reviews-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.review-item {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.review-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
}

.review-stars {
    color: #FFD700;
}

.star-rating-input i {
    font-size: 1.5rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s;
}

.star-rating-input i.active {
    color: #FFD700;
}

.qty-anim {
    animation: qty-pop 0.3s ease;
}

/* Cart Count Animation */
@keyframes cart-bump {
    0% { transform: scale(1); }
    50% { transform: scale(1.5); }
    100% { transform: scale(1); }
}

.cart-bump {
    animation: cart-bump 0.3s ease;
}

/* Portfolio Details Page */
.portfolio-hero-section {
    margin-bottom: 60px;
}

.portfolio-hero-img {
    width: 100%;
    height: 60vh;
    min-height: 400px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.project-meta-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    background: #f8f9fa;
    padding: 30px 40px;
    border-radius: 12px;
    margin-top: -60px;
    position: relative;
    z-index: 10;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    justify-content: space-between;
}

.meta-col h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #8B4513;
    margin-bottom: 8px;
    font-weight: 700;
}

.meta-col p {
    font-size: 1.1rem;
    font-weight: 600;
    color: #121212;
    margin: 0;
}

.project-narrative {
    max-width: 800px;
    margin: 80px auto;
}

.project-narrative h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #121212;
}

.project-narrative p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 30px;
}

.project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 80px;
}

.project-gallery-grid img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s;
}

.project-gallery-grid img:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .project-meta-bar {
        flex-direction: column;
        gap: 20px;
        margin-top: 20px;
        width: 100%;
    }
    .project-gallery-grid {
        grid-template-columns: 1fr;
    }
}