/* Import Google Fonts for a luxurious and modern feel */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Lato:wght@300;400;700&display=swap');

/* --- Global Styles --- */
body {
    font-family: 'Lato', sans-serif; /* A clean sans-serif for general text */
    margin: 0;
    padding: 0;
    background-color: #F8F4E3; /* Soft, warm off-white for a summer glow */
    color: #333333; /* Dark charcoal for good contrast */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased; /* Smoother font rendering */
    scroll-behavior: smooth; /* Smooth scrolling */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif; /* Elegant serif font for luxury */
    font-weight: 700;
    color: #4A2B00; /* Deep, rich brown for warmth and luxury */
    margin-bottom: 20px;
    letter-spacing: 0.5px; /* Subtle letter spacing for elegance */
}

a {
    text-decoration: none;
    color: #8B4513; /* A refined saddle brown for links */
    transition: color 0.3s ease, border-color 0.3s ease;
}

a:hover {
    color: #CD853F; /* Lighter shade of brown on hover */
}

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

/* --- Buttons and Inputs --- */
button,
input[type="submit"] {
    background-color: #4A2B00; /* Rich brown for primary actions */
    color: #FFFFFF;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    font-size: 1em;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-transform: uppercase; /* For a refined button look */
    letter-spacing: 1px;
}

button:hover,
input[type="submit"]:hover {
    background-color: #6B4C2D; /* Slightly lighter on hover */
    transform: translateY(-2px);
}

button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

input[type="text"],
input[type="number"],
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Lato', sans-serif;
    font-size: 1em;
    color: #333;
    box-sizing: border-box; /* Include padding in width */
}

/* --- Header & Navigation --- */
.header {
    text-align: center;
    padding: 60px 20px;
    background-color: #FFFFFF; /* Clean white for a fresh look */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 40px;
}

.header h1 {
    font-size: 3em;
    margin: 0;
    letter-spacing: 2px;
}

/* Cart Container in header.html */
.cart-container {
    position: absolute; /* Position relative to the nearest positioned ancestor (body if none) */
    top: 30px; /* Adjust as needed */
    right: 50px; /* Adjust as needed */
    z-index: 1000;
}

.cart-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #FFF;
    border: 1px solid #EDE8D6;
    border-radius: 25px; /* Pill shape */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    color: #4A2B00;
}

.cart-link:hover {
    background-color: #EDE8D6;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.cart-icon {
    font-size: 1.5em; /* Larger icon */
    margin-right: 8px;
}

.cart-info {
    font-size: 0.95em;
    font-weight: 600;
}

.item-count {
    color: #E25822; /* Highlight item count */
    font-weight: 700;
}

.total-price {
    color: #35921b; /* Consistent with other pricing */
    font-weight: 700;
}


/* --- Product Listing Page (list.html) --- */
.container {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    gap: 40px; /* Space between categories and products */
    justify-content: flex-start; /* Aligns content to the very left */
}

/* Small Div (Categories) - Left Menu */
.small-div {
    flex: 0 0 250px; /* Width for the category sidebar */
    background-color: #FFFFFF;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    align-self: flex-start; /* Stick to the top */
    border-top: 3px solid #E25822; /* Subtle top border for emphasis */
}

.categories {
    padding: 0;
    margin: 0;
}

.category {
    margin-bottom: 18px;
}

.category a {
    display: block;
    padding: 12px 18px;
    font-size: 1.15em;
    font-weight: 500;
    color: #555555;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease, border-left 0.3s ease;
    border-left: 3px solid transparent; /* For active state highlight */
}

.category a:hover,
.category a.active { /* Add 'active' class to current category link in your Django view */
    background-color: #EDE8D6; /* Light, warm background on hover/active */
    color: #4A2B00;
    border-left-color: #E25822; /* Highlight active category */
}

/* Large Div (Products Grid) */
.large-div {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); /* Products are slightly smaller now */
    gap: 25px; /* Reduced gap for a tighter grid */
}

.product {
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    padding-bottom: 20px; /* Padding for content below image */
}

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

.product h2 {
    font-size: 1.5em; /* Adjusted heading size for smaller products */
    margin: 20px 0 10px;
    padding: 0 15px;
    line-height: 1.3;
}

.product h2 a {
    color: #4A2B00;
}

.product h2 a:hover {
    color: #8B4513;
}

.product .pic {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1; /* Ensures images are square */
    object-fit: cover; /* Covers the area without distortion */
    border-radius: 12px; /* Rounded corners for images */
    display: block;
    margin-bottom: 15px;
}

.price {
    margin-top: 10px;
    font-family: 'Lato', sans-serif;
    font-size: 1.2em; /* Slightly smaller overall price font */
    font-weight: bold;
    color: #4A2B00;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.original-price {
    text-decoration: line-through;
    color: #888888;
    font-size: 0.9em; /* Smaller for original price */
    font-weight: normal;
    margin-bottom: 3px;
}

.discounted-price {
    color: #E25822; /* Vibrant orange-red for discounted price */
    font-size: 1.4em; /* Prominent for discounted price */
    font-weight: bold;
}

/* --- Product Detail Page (detail.html) --- */
.product-container {
    display: flex;
    flex-wrap: wrap; /* Allows items to wrap on smaller screens */
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px; /* More padding for a premium feel */
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    gap: 50px; /* Increased gap */
}

.product-details {
    flex: 1; /* Takes available space */
    min-width: 300px; /* Ensures it doesn't get too small */
    padding-right: 20px;
}

.product-details h2 {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #4A2B00;
}

.product-details p {
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #555;
}

.product-details ul {
    margin: 20px 0;
}

.product-details ul li {
    background-color: #EDE8D6; /* Light background for features */
    margin-bottom: 8px;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 1em;
    color: #4A2B00;
    display: inline-block; /* Display as tags */
    margin-right: 10px;
}

.product-details .price {
    margin-top: 30px;
    font-size: 1.5em;
    align-items: flex-start; /* Align prices to the left */
}

.product-details .original-price {
    font-size: 1.1em;
}

.product-details .discounted-price {
    font-size: 1.8em;
}

/* Quantity input for detail page */
#id-quantity {
    width: 80px; /* Fixed width for quantity input */
    margin-right: 15px;
    text-align: center;
    border: 1px solid #CD853F;
    border-radius: 5px;
    padding: 8px 5px;
    font-size: 1em;
}

.product-images {
    flex: 1;
    min-width: 400px; /* Ensure images area is not too small */
    display: flex;
    flex-wrap: wrap; /* For multiple images */
    gap: 15px; /* Gap between images */
    justify-content: center; /* Center images if few */
}

.product-images img {
    width: 100%;
    max-width: 450px; /* Max width for a single main image */
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.product-images img:hover {
    transform: scale(1.02);
}

.product-description {
    max-width: 1200px;
    margin: 40px auto; /* Spacing from product section */
    padding: 30px 20px;
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.product-description h3 {
    font-size: 2em;
    border-bottom: 2px solid #EDE8D6;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.product-description p {
    font-size: 1.05em;
    color: #444;
}

/* --- Footer (Add your own styling for partials/footer.html if needed) --- */
/* Example: */
footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
    background-color: #4A2B00;
    color: #FFFFFF;
    font-size: 0.9em;
}

footer p {
    margin: 0;
}


/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
    .container, .product-container, .product-description {
        padding-left: 15px;
        padding-right: 15px;
    }

    .large-div {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Even smaller products */
        gap: 20px;
    }

    .product-details, .product-images {
        min-width: unset; /* Remove min-width to allow more flexibility */
        flex-basis: 100%; /* Take full width on smaller screens */
        padding-right: 0;
    }

    .product-images {
        flex-direction: column; /* Stack images vertically */
        align-items: center;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 40px 15px;
    }
    .header h1 {
        font-size: 2.5em;
    }

    .cart-container {
        top: 20px;
        right: 20px;
    }

    .container {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .small-div {
        width: 100%;
        max-width: 350px;
        margin-bottom: 20px;
        padding: 25px;
    }

    .large-div {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }

    .product h2 {
        font-size: 1.3em;
    }

    .product .pic {
        height: 180px; /* Maintain square ratio, but adjust height */
    }

    .product-container {
        padding: 25px 15px;
        gap: 30px;
    }

    .product-details h2 {
        font-size: 2em;
    }

    .product-details .price {
        font-size: 1.3em;
    }

    .product-details .discounted-price {
        font-size: 1.6em;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 2em;
    }

    .large-div {
        grid-template-columns: 1fr; /* Single column on very small screens */
        gap: 20px;
    }

    .product {
        padding-bottom: 15px;
    }

    .product-details h2 {
        font-size: 1.8em;
    }

    .product-images img {
        max-width: 100%; /* Allow images to fill their container */
    }
}
*/
/* Cart page styling */
.header {
    text-align: center;
    margin-top: 30px;
}

.cart-content {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.product-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}

.product-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    margin-right: 20px;
    border-radius: 8px;
}

.product-info {
    flex-grow: 1;
}

.product-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #333;
}

.product-info p {
    margin: 4px 0;
    color: #666;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.actions div {
    background-color: #eee;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s;
}

.actions div:hover {
    background-color: #ddd;
}

.total-price {
    color: green !important;
    margin-top: 30px;
    padding: 15px;
    background: #f1f1f1;
    border-radius: 10px;
    font-size: 18px;
    color: #222;
    text-align: center;
}

.total-price p {
    margin: 8px 0;
}

.checkout-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.checkout-buttons .back-btn {
    background-color: #007BFF;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.3s;
}

.checkout-buttons .back-btn:hover {
    background-color: #0056b3;
}

.checkout-buttons a {
    color: white;
    text-decoration: none;
}

.continue-btn a {
    display: inline-block;
    background-color: #28a745; /* Green */
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.continue-btn a:hover {
    background-color: #218838; /* Darker green on hover */
}

#empty-cart-message {
    color: #240505;
    font-size: 1.2em;
    margin-top: 20px;
}

/* Center the form container vertically and horizontally */
.form-container {
    display: flex;
    justify-content: center;  /* horizontally center */
    align-items: center;      /* vertically center */
    min-height: 80vh;         /* take most of viewport height */
    padding: 20px;
    background-color: #f5f5f5; /* subtle background */
}

  /* Style the card */
.form-card {
    background: white;
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

  /* Heading style */
.form-card h2 {
    margin-bottom: 20px;
    font-weight: 700;
    color: #333;
    text-align: center;
}

  /* Input style */
.form-card input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    margin: 10px 0 20px;
    border: 1px solid #877c24;
    border-radius: 4px;
    font-size: 16px;
}

  /* Button style */
.form-card button {
    width: 100%;
    padding: 14px;
    background-color: #007bff; /* nice blue */
    color: white(255, 255, 255);
    font-weight: 600;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.form-card button:hover {
    background-color: #0056b3;
}

  /* Error message */
.error-text {
    color: #d93025;
    margin-top: -15px;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Mobile styles */
@media (max-width: 600px) {
    .form-container {
    padding: 10px;
      min-height: auto; /* let height adjust */
    }

    .form-card {
    padding: 20px;
      max-width: 100%; /* take full width */
    border-radius: 0;
    box-shadow: none;
    }

    .form-card input[type="text"],
    .form-card button {
    font-size: 14px;
    padding: 12px;
    }
}
/* --- Site Header --- */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #fff;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1000;
}

/* Header sections */
.site-header .left-section,
.site-header .right-section {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Sticky top header */
.top-header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    z-index: 1000;
}

/* Inner wrapper */
.header-inner {
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Logo --- */
.site-header .logo {
    display: block;
    max-width: 180px;   /* desktop width */
    max-height: 100px;  /* desktop height */
}

/* Responsive logo */
@media (max-width: 768px) {
    .site-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .site-header .logo {
        max-width: 160px;
        max-height: 90px;
    }
}

@media (max-width: 480px) {
    .site-header .logo {
        max-width: 140px;
        max-height: 80px;
    }
}

/* --- Right Icons --- */
.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.header-icon {
    display: flex;
    align-items: center;
    font-size: 16px;
    color: #4A2B00;
    text-decoration: none;
    transition: color 0.3s ease;
}

.header-icon i {
    font-size: 20px;
}

.header-icon:hover {
    color: #CD853F;
}

.store-text {
    margin-left: 6px;
    font-size: 14px;
    font-weight: 500;
}

.cart-info {
    margin-left: 6px;
    font-weight: 600;
    font-size: 14px;
}

.item-count {
    color: #E25822;
    font-weight: 700;
}

/* Hide text on small screens */
@media (max-width: 768px) {
    .store-text,
    .cart-info {
        display: none;
    }
}

/* --- Main Banner --- */
.main-banner {
    position: relative;
    width: 100%;
    height: 600px;       /* desktop height */
    overflow: hidden;
    max-width: 100%;
}

.main-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 0;
}

.main-banner img.active {
    opacity: 1;
    z-index: 1;
    position: relative;
}

/* Banner dots */
.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.banner-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: background 0.3s;
}

.banner-dots span.active {
    background: #fff;
}

/* Mobile banner height */
@media (max-width: 768px) {
    .main-banner {
        height: 400px;
    }
}

/* General footer style */
.site-footer {
    background: #a4854a;
    padding: 40px 20px 20px;
    font-family: 'Arial', sans-serif;   /* make consistent font */
    color: #333;
    text-align: center;
}

/* Logo on top */
.footer-logo img {
    max-width: 150px;
    margin: 0 auto 20px;
    display: block;
}

/* Columns layout */
.footer-top {
    display: grid;
    grid-template-columns: repeat(6, 1fr);  /* 6 equal columns */
    gap: 20px;
    text-align: left;
    max-width: 1200px;
    margin: 0 auto 30px;
}

/* Column headings */
.footer-column h4 {
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: bold;
}

/* Links */
.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column ul li a {
    text-decoration: none;
    color: #555;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-column ul li a:hover {
    color: #000;
}

/* Branch addresses */
.footer-column p {
    margin: 4px 0;
    font-size: 14px;
    line-height: 1.4;
}

/* === PHONE VIEW ONLY: header + footer === */
@media (max-width: 576px) {

    /* --- HEADER --- */
    .top-header {
        padding: 10px;               /* tighter padding */
        text-align: center;
    }
    .top-header img {
        max-width: 120px;            /* smaller logo */
    }
    .top-header nav a {
        font-size: 12px;             /* smaller nav links */
        margin: 0 5px;
    }

    /* --- FOOTER --- */
    .site-footer .footer-top {
        grid-template-columns: repeat(3, 1fr); /* 3 columns on phone */
        gap: 15px;
        max-width: 90%;
        margin: 0 auto;              /* centered */
    }
    .site-footer .footer-column h4 {
        font-size: 12px;
    }
    .site-footer .footer-column ul li,
    .site-footer .footer-column ul li a,
    .site-footer .footer-column p {
        font-size: 11px;
    }
    .site-footer .footer-logo img {
        max-width: 100px;
    }
    .site-footer .footer-bottom {
        font-size: 11px;
    }
}


.search-bar {
    display: none;
    position: absolute;
    top: 60px;        /* adjust based on header height */
    left: 50%;        /* center horizontally */
    transform: translateX(-50%); /* center exact */
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 5px 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.search-bar input {
    width: 300px;     /* wider input for center placement */
    border: none;
    outline: none;
    padding: 8px;
    font-size: 14px;
}
.main-banner {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    transition: all 0.5s ease; /* smooth slide effect */
}

.main-banner.hide {
    height: 0;
    opacity: 0;
    padding: 0;
    margin: 0;
}

/* Our Stores Page */
.our-stores-container {
    max-width: 1200px;
    margin: 50px auto;
    text-align: center;
    padding: 0 20px;
}

.our-stores-title {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 40px;
    color: #4b2e2b;
}

.stores-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.store-card {
    background-color: #f5ebdc;  /* creamish box */
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 300px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.store-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.store-card h4 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #4b2e2b;
}

.store-card p {
    margin: 6px 0;
    font-size: 14px;
    color: #4b2e2b;
}

@media (max-width: 768px) {
    .stores-grid {
        flex-direction: column;
        align-items: center;
    }
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: white;
    background: rgba(0,0,0,0.3);
    padding: 10px;
    cursor: pointer;
    z-index: 3;
    border-radius: 50%;
    transition: background 0.3s;
}

.banner-arrow:hover {
    background: rgba(0,0,0,0.6);
}

.banner-prev {
    left: 15px;
}

.banner-next {
    right: 15px;
}

