/* --- Global Reset & Base Styles --- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #eaeded; /* Light Amazon-like background */
    -webkit-font-smoothing: antialiased; /* Smoother fonts */
    -moz-osx-font-smoothing: grayscale; /* Smoother fonts */
}

.container {
    width: 95%; /* Slightly wider content area */
    max-width: 1400px; /* Wider content area for more products */
    margin: 0 auto;
    padding: 10px 0; /* Reduced vertical padding for compact feel */
}

a {
    text-decoration: none;
    color: inherit; /* Inherit color unless specified */
}

ul {
    list-style: none;
}

/* --- Header Styling --- */
.main-header {
    background-color: #131921; /* Dark Amazon-like header blue */
    color: #fff;
    padding: 8px 0; /* Slightly thinner header */
    box-shadow: 0 2px 5px rgba(0,0,0,0.15); /* More prominent shadow */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 5px 0; /* Padding inside the content div */
}

.site-logo {
    color: #ffe033; /* Yellow logo for contrast */
    font-size: 2.1em; /* Slightly larger logo */
    font-weight: 900; /* Very bold */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap; /* Prevent logo wrapping */
}

/* Search Bar */
.search-bar-container {
    display: flex;
    flex-grow: 1;
    max-width: 700px; /* Wider search bar */
    border-radius: 4px;
    overflow: hidden;
    height: 40px; /* Fixed height for search bar */
}

.search-bar-container input {
    border: none;
    padding: 10px 15px;
    font-size: 1em;
    outline: none;
    flex-grow: 1;
    color: #333;
    background-color: #fff;
}

.search-bar-container input::placeholder {
    color: #888;
}

.search-btn {
    background-color: #f0c14b; /* Amazon's distinct yellow */
    color: #333;
    border: none;
    padding: 0 15px; /* Adjust padding for height */
    cursor: pointer;
    font-size: 1.2em; /* Larger icon */
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    display: flex; /* For icon alignment */
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background-color: #e4b238;
}

/* Main Navigation */
.main-nav ul {
    display: flex;
    gap: 25px;
}

.nav-link {
    font-weight: 400; /* Lighter font weight for subtle links */
    color: #fff;
    transition: color 0.2s ease;
    display: flex; /* For icon alignment */
    align-items: center;
    gap: 5px;
}

.nav-link:hover {
    color: #f0c14b; /* Yellow hover */
}

.cart-link {
    font-size: 1.1em;
    font-weight: 500; /* Slightly bolder for cart */
}

.cart-link .cart-count {
    background-color: #dc3545; /* Red for count bubble */
    color: #fff;
    border-radius: 50%;
    padding: 2px 7px;
    font-size: 0.7em;
    font-weight: bold;
    margin-left: 5px;
    min-width: 20px;
    text-align: center;
    display: inline-flex; /* Align text vertically */
    align-items: center;
    justify-content: center;
}

/* Main Categories Nav */
.main-categories-nav {
    background-color: #232f3e; /* Darker blue for categories bar */
    padding: 8px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.main-categories-nav ul {
    display: flex;
    justify-content: flex-start; /* Align categories to the left */
    gap: 25px;
}

.main-categories-nav a {
    color: #fff;
    font-weight: 500;
    font-size: 0.95em;
    padding: 5px 0;
    transition: color 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}

.main-categories-nav a:hover {
    color: #f0c14b;
    transform: translateY(-1px);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 25px; /* Larger buttons */
    border-radius: 4px;
    font-size: 1.05em;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
    border: none;
    outline: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Default button shadow */
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-primary {
    background-color: #007bff; /* Flipkart-like blue */
    color: #fff;
}

.btn-primary:hover {
    background-color: #0069d9;
}

.btn-secondary {
    background-color: #ffe033; /* Yellow for "Add to Cart" */
    color: #333;
    border: 1px solid #ffcc00; /* Subtle border */
}

.btn-secondary:hover {
    background-color: #ffcf00;
}

/* --- Hero Section --- */
.hero-section {
    background: url('../images/hero-bg.jpg') no-repeat center center/cover;
    background-color: #c7edfc; /* Fallback light blue */
    color: #fff; /* White text on hero */
    text-align: center;
    padding: 100px 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
    position: relative; /* For overlay */
    z-index: 1; /* Ensure text is above overlay */
}

/* Dark overlay for text readability on hero */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4); /* Darker overlay */
    z-index: -1; /* Behind text */
    border-radius: 8px;
}

.hero-text {
    position: relative;
    z-index: 2; /* Ensure text is above overlay */
    max-width: 900px;
    margin: 0 auto;
}

.hero-section h1 {
    font-size: 4.5em; /* Larger, more impactful heading */
    margin-bottom: 20px;
    color: #fff; /* White text */
    font-weight: 900; /* Very bold */
    text-shadow: 2px 2px 5px rgba(0,0,0,0.4); /* Text shadow for pop */
    line-height: 1.1;
}

.hero-section p {
    font-size: 1.5em;
    margin-bottom: 40px;
    color: #f0f0f0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

.hero-btn {
    padding: 15px 35px; /* Larger hero button */
    font-size: 1.2em;
    background-color: #f0c14b; /* Amazon yellow for hero button */
    color: #333;
    display: inline-flex; /* For icon */
    align-items: center;
    gap: 10px;
    border: 1px solid #cc9900;
}

.hero-btn:hover {
    background-color: #e4b238;
}

/* --- Product Listing --- */
.product-listing-section {
    padding: 20px 0;
    margin-bottom: 40px;
}

.section-title {
    font-size: 2.8em; /* Larger section titles */
    color: #333;
    text-align: center;
    margin-bottom: 35px;
    font-weight: 700;
    position: relative;
    padding-bottom: 15px; /* Space for underline effect */
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px; /* Short underline */
    height: 4px;
    background-color: #f0c14b; /* Accent color for underline */
    border-radius: 2px;
}


.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); /* Adapt for more columns, minimum 240px */
    gap: 20px; /* Slightly reduced gap */
}

.product-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); /* More pronounced shadow */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%; /* Ensure cards are same height */
    position: relative;
}

.product-card:hover {
    transform: translateY(-8px); /* More pronounced lift on hover */
    box-shadow: 0 10px 20px rgba(0,0,0,0.2); /* Stronger shadow on hover */
}

.product-card-link {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px;
    text-align: center;
    color: #333;
}

.product-card-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden; /* Ensure images don't overflow */
}

.product-card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05); /* Subtle zoom on image hover */
}

.product-card-info {
    flex-grow: 1; /* Allows info to take available space */
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.25em; /* Slightly larger title */
    margin-bottom: 8px;
    font-weight: 500;
    line-height: 1.3;
    min-height: 2.6em; /* Ensure consistent height for 2 lines of text */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
}

.product-category {
    font-size: 0.85em;
    color: #888;
    margin-bottom: 10px;
}

.product-rating {
    color: #f5b30a; /* Gold color for stars */
    font-size: 0.9em;
    margin-bottom: 10px;
}

.product-rating .fas, .product-rating .far {
    margin-right: 2px;
}

.product-price {
    margin-top: auto; /* Pushes price to bottom */
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: baseline;
    gap: 8px;
}

.current-price {
    font-size: 1.8em; /* Larger current price */
    color: #dc3545; /* Red for current price */
    font-weight: 700;
}

.original-price {
    font-size: 1em;
    color: #888;
    text-decoration: line-through;
    font-weight: 400;
}

.discount {
    background-color: #28a745; /* Green for discount badge */
    color: #fff;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.85em;
    font-weight: 500;
    white-space: nowrap;
}

.add-to-cart-btn {
    width: 100%;
    padding: 15px 20px; /* Larger add to cart button */
    border-radius: 0 0 8px 8px; /* Rounded only at bottom */
    background-color: #f0c14b; /* Amazon yellow for action */
    color: #333;
    border: none;
    font-weight: 500;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: none; /* Override general button shadow */
}

.add-to-cart-btn:hover {
    background-color: #e4b238;
    transform: none; /* No lift on this button */
}


/* --- Footer Styling --- */
.main-footer {
    background-color: #232f3e; /* Dark Amazon-like footer */
    color: #fff;
    padding-top: 40px;
    font-size: 0.9em;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* Slightly wider columns */
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #3a475a;
}

.footer-section h3 {
    font-size: 1.15em; /* Slightly smaller heading */
    margin-bottom: 15px;
    color: #fff; /* White headings */
    font-weight: 700; /* Bold */
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ccc;
    transition: color 0.2s ease;
}

.footer-section ul li a:hover {
    color: #f0c14b; /* Yellow hover */
}

.footer-section p {
    color: #ccc;
}

.footer-bottom {
    background-color: #131a22; /* Even darker bottom footer */
    padding: 15px 0;
    text-align: center;
}

.footer-bottom p {
    color: #aaa;
    font-size: 0.85em;
}


/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
    .header-content {
        flex-wrap: wrap;
        justify-content: center;
    }
    .site-logo {
        margin-bottom: 10px;
    }
    .search-bar-container {
        order: 3; /* Move search bar below logo/nav */
        width: 100%;
        max-width: 100%;
        margin-top: 10px;
    }
    .main-nav {
        order: 2; /* Keep nav next to logo */
        margin-left: auto;
    }
    .main-nav ul {
        gap: 15px;
    }
    .main-categories-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px 20px;
    }
    .hero-section h1 {
        font-size: 3.5em;
    }
    .hero-section p {
        font-size: 1.3em;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Allow smaller cards */
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    .site-logo {
        font-size: 1.8em;
    }
    .main-nav {
        width: 100%;
        margin: 5px 0 0;
    }
    .main-nav ul {
        justify-content: center;
    }
    .main-categories-nav ul {
        justify-content: flex-start; /* Prefer scrollable if too many items */
        overflow-x: auto;
        padding-bottom: 5px; /* For scrollbar */
    }
    .hero-section {
        padding: 80px 15px;
    }
    .hero-section h1 {
        font-size: 2.5em;
    }
    .hero-section p {
        font-size: 1.1em;
    }
    .section-title {
        font-size: 2em;
    }
    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Single column on very small, two on slightly larger */
    }
}

@media (max-width: 480px) {
    .site-logo {
        font-size: 1.6em;
    }
    .search-bar-container {
        height: 35px;
    }
    .search-bar-container input, .search-btn {
        font-size: 0.9em;
    }
    .main-nav ul {
        gap: 10px;
    }
    .nav-link {
        font-size: 0.85em;
    }
    .main-categories-nav ul {
        gap: 10px 15px;
        padding-left: 10px; /* Give some space on left */
    }
    .main-categories-nav a {
        font-size: 0.8em;
    }
    .hero-section {
        padding: 50px 10px;
    }
    .hero-section h1 {
        font-size: 1.8em;
    }
    .hero-section p {
        font-size: 0.9em;
    }
    .btn {
        padding: 10px 15px;
        font-size: 0.9em;
    }
    .product-card-image {
        height: 150px;
    }
    .product-title {
        font-size: 1.1em;
    }
    .current-price {
        font-size: 1.5em;
    }
    .original-price, .discount {
        font-size: 0.8em;
    }
    .footer-content {
        grid-template-columns: 1fr;
        text-align: left;
    }
    .footer-section {
        padding-bottom: 20px; /* Space between sections */
    }
    .footer-section:not(:last-child) {
        border-bottom: 1px solid #3a475a;
    }
    .footer-bottom {
        font-size: 0.75em;
    }
}
.product-detail-page {
    padding-top: 30px;
    padding-bottom: 50px;
}

.product-breadcrumb {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 25px;
}

.product-breadcrumb a {
    color: #007bff;
    transition: color 0.2s ease;
}

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

.product-main-area {
    display: flex;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    gap: 40px; /* Space between image gallery and info */
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* Product Gallery */
.product-gallery {
    flex: 1.5; /* Takes more space than info on large screens */
    min-width: 300px; /* Minimum width before wrapping */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-image {
    width: 100%;
    max-width: 500px; /* Max size for main image */
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    background-color: #fff;
    padding: 10px; /* Padding inside border */
}

.main-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.thumbnail-images {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.thumbnail-images img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.1s ease;
    padding: 2px; /* Inner padding for thumbnails */
}

.thumbnail-images img:hover {
    border-color: #f0c14b;
    transform: scale(1.05);
}

.thumbnail-images img.active {
    border-color: #007bff; /* Active thumbnail indicator */
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.5); /* Blue glow */
}

/* Product Info Area */
.product-info-area {
    flex: 2; /* Takes more space than gallery on large screens */
    min-width: 350px;
    padding-left: 20px; /* Space from image */
}

.product-info-area .product-title {
    font-size: 2.2em; /* Larger title on PDP */
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.product-brand {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 15px;
}

.product-rating-detail {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.product-rating-detail .stars {
    color: #f5b30a; /* Gold stars */
    font-size: 1.1em;
}

.product-rating-detail .stars span {
    color: #333;
    font-size: 0.9em;
    margin-left: 5px;
}

.review-link {
    color: #007bff;
    font-size: 0.9em;
    transition: color 0.2s ease;
}

.review-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.info-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

/* Price Section */
.product-price-section {
    margin-bottom: 20px;
}

.price-line {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 5px;
}

.price-label {
    font-weight: 500;
    color: #555;
    font-size: 1em;
    white-space: nowrap;
}

.current-price-lg {
    font-size: 2.5em; /* Very large current price */
    font-weight: 700;
    color: #dc3545; /* Red for current price */
}

.original-price-lg {
    font-size: 1.2em;
    color: #888;
    text-decoration: line-through;
    white-space: nowrap;
}

.discount-percent-lg {
    background-color: #28a745; /* Green for discount */
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 1em;
    font-weight: 500;
    white-space: nowrap;
}

.tax-info {
    font-size: 0.85em;
    color: #888;
    margin-top: 10px;
}

/* Product Options */
.product-options {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Space between option groups */
    align-items: flex-end;
}

.option-group {
    display: flex;
    flex-direction: column;
    min-width: 120px; /* Minimum width for select boxes */
}

.option-group label {
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
    font-size: 0.95em;
}

.product-select,
.product-quantity {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    background-color: #fff;
    -webkit-appearance: none; /* Remove default select arrow */
    -moz-appearance: none;
    appearance: none;
    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%3E%3Cpath%20fill%3D%22%23007bff%22%20d%3D%22M287%2069.9a14.7%2014.7%200%200%200%20-20.8%200l-125.6%20125.6-125.6-125.6a14.7%2014.7%200%200%200%20-20.8%2020.8l136%20136c5.8%205.8%2014.7%205.8%2020.4%200l136-136c5.8-5.8%205.8-14.7%200-20.8z%22%2F%3E%3C%2Fsvg%3E'); /* Custom arrow */
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 12px auto;
    cursor: pointer;
}

.product-select:focus,
.product-quantity:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    outline: none;
}

.product-quantity {
    width: 80px; /* Fixed width for quantity input */
    text-align: center;
    -moz-appearance: textfield; /* Remove arrows in Firefox */
}

.product-quantity::-webkit-outer-spin-button,
.product-quantity::-webkit-inner-spin-button {
    -webkit-appearance: none; /* Remove arrows in Chrome/Safari */
    margin: 0;
}


/* Add to Cart/Buy Now Buttons */
.add-to-cart-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

.add-to-cart-btn-lg,
.buy-now-btn-lg {
    flex: 1; /* Make buttons take equal space */
    min-width: 180px; /* Minimum width for buttons */
    padding: 15px 20px; /* Larger padding */
    font-size: 1.15em; /* Larger text */
}

.add-to-cart-btn-lg {
    background-color: #f0c14b; /* Amazon yellow */
    color: #333;
    border: 1px solid #c9a74a;
}

.add-to-cart-btn-lg:hover {
    background-color: #e4b238;
}

.buy-now-btn-lg {
    background-color: #ff9900; /* Darker orange for Buy Now */
    color: #fff;
    border: 1px solid #cc7a00;
}

.buy-now-btn-lg:hover {
    background-color: #e68a00;
}


/* Product Description */
.product-description h2 {
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.product-description p {
    margin-bottom: 15px;
    line-height: 1.7;
    color: #555;
}

.product-description ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 15px;
    color: #555;
}

.product-description ul li {
    margin-bottom: 8px;
}

/* --- Customer Reviews Section --- */
.customer-reviews-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-top: 30px;
}

.customer-reviews-section .section-title {
    text-align: left; /* Align title left */
    margin-bottom: 30px;
    padding-bottom: 10px;
    font-size: 2em; /* Smaller section title than main ones */
}

.customer-reviews-section .section-title::after {
    left: 0;
    transform: none; /* Align underline left */
}

.review-summary {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.review-summary h3 {
    font-size: 1.6em;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.review-summary .stars-large {
    color: #f5b30a;
    font-size: 1.8em; /* Large stars for summary */
    margin-bottom: 10px;
}

.review-summary p {
    color: #555;
    font-size: 1em;
}

.review-list {
    margin-top: 20px;
}

.review-item {
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

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

.review-header {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 8px;
}

.review-header .review-author {
    font-weight: 500;
    color: #333;
}

.review-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.review-rating .fas {
    color: #f5b30a;
    font-size: 1em;
}

.review-rating .review-title {
    font-weight: 700;
    color: #007bff;
    font-size: 1.1em;
}

.review-text {
    line-height: 1.6;
    color: #444;
}

/* --- Responsive Adjustments for Product Detail Page --- */
@media (max-width: 992px) {
    .product-main-area {
        flex-direction: column;
        padding: 20px;
    }
    .product-gallery, .product-info-area {
        min-width: unset;
        width: 100%;
        padding-left: 0;
    }
    .product-info-area .product-title {
        font-size: 2em;
        text-align: center;
    }
    .product-brand, .product-rating-detail, .product-price-section, .product-options, .add-to-cart-actions, .product-description {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    .product-price-section .price-line {
        justify-content: center;
    }
    .product-options {
        justify-content: center;
    }
    .product-select, .product-quantity {
        margin-left: auto;
        margin-right: auto;
    }
    .add-to-cart-actions {
        justify-content: center;
        flex-direction: column; /* Stack buttons on smaller tablets */
        gap: 10px;
    }
    .add-to-cart-btn-lg, .buy-now-btn-lg {
        min-width: unset;
        width: 100%;
    }
    .customer-reviews-section .section-title {
        text-align: center;
    }
    .customer-reviews-section .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .review-item {
        text-align: left; /* Keep review text aligned left */
    }
}

@media (max-width: 576px) {
    .product-main-area {
        padding: 15px;
    }
    .product-info-area .product-title {
        font-size: 1.8em;
    }
    .current-price-lg {
        font-size: 2em;
    }
    .original-price-lg, .discount-percent-lg {
        font-size: 0.9em;
    }
    .add-to-cart-btn-lg, .buy-now-btn-lg {
        font-size: 1em;
        padding: 12px 15px;
    }
    .product-options {
        gap: 10px;
    }
    .option-group {
        min-width: unset;
        width: 48%; /* Two columns for options */
    }
    .product-select, .product-quantity {
        width: 100%;
    }
}
.product-brand .brand-link {
    color: #007bff;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.product-brand .brand-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Availability Status */
.availability-status {
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.availability-status.in-stock {
    color: #28a745; /* Green for in stock */
}

.availability-status .fas.fa-check-circle {
    font-size: 1em;
}

.sold-by {
    font-size: 0.9em;
    color: #555;
    font-weight: 400;
    margin-left: 15px; /* Separate from stock status */
}

.sold-by .seller-link {
    color: #007bff;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.sold-by .seller-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Delivery Estimate */
.delivery-estimate {
    font-size: 0.95em;
    color: #555;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%; /* Take full width above buttons */
    justify-content: center; /* Center on smaller screens */
    text-align: center;
}

.delivery-estimate .fas.fa-truck {
    color: #f0c14b; /* Accent color for truck icon */
}

.delivery-estimate .delivery-date {
    font-weight: 700;
    color: #333;
}

/* Add to Cart/Buy Now Button Styling Adjustments (Re-Apply if necessary) */
/* Ensure the button styles are consistent, just re-iterating to be safe */
.add-to-cart-btn-lg {
    background-color: #f0c14b; /* Amazon yellow */
    color: #333;
    border: 1px solid #c9a74a;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.add-to-cart-btn-lg:hover {
    background-color: #e4b238;
}

.buy-now-btn-lg {
    background-color: #ff9900; /* Darker orange for Buy Now */
    color: #fff;
    border: 1px solid #cc7a00;
}

.buy-now-btn-lg:hover {
    background-color: #e68a00;
}


/* General PDP layout adjustments */
@media (max-width: 992px) {
    .product-info-area {
        padding-left: 0;
    }
    .availability-status {
        justify-content: center; /* Center status on tablets */
    }
    .sold-by {
        margin-left: 0; /* Remove left margin on smaller screens */
        margin-top: 5px; /* Add some space above */
        display: block; /* Break to new line */
    }
}

@media (max-width: 576px) {
    .product-info-area .product-title {
        text-align: center;
    }
    .product-brand, .product-rating-detail {
        justify-content: center; /* Center rating and brand info */
    }
    .product-main-area {
        padding: 15px;
    }
}
/* --- Shopping Cart Page Specific Styles --- */
.cart-page {
    padding-top: 30px;
    padding-bottom: 50px;
}

.cart-page .section-title {
    text-align: left; /* Align title left */
    margin-bottom: 30px;
    padding-bottom: 10px;
    font-size: 2.2em; /* Slightly larger title for cart */
}

.cart-page .section-title::after {
    left: 0;
    transform: none; /* Align underline left */
}

.cart-content-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start; /* Align cart items and summary at the top */
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.cart-items-list {
    flex: 3; /* Cart items take more space */
    min-width: 500px; /* Minimum width for cart items list */
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 20px;
}

.cart-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
}

.cart-item:last-child {
    border-bottom: none; /* No border for the last item */
}

.item-image {
    flex-shrink: 0; /* Prevent image from shrinking */
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

.item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.item-details {
    flex-grow: 1; /* Details take available space */
}

.item-title {
    font-size: 1.3em;
    font-weight: 500;
    margin-bottom: 8px;
}

.item-title a {
    color: #007bff;
    transition: color 0.2s ease;
}

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

.item-brand {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 5px;
}

.item-price {
    font-size: 1.1em;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.item-stock {
    font-size: 0.9em;
    font-weight: 500;
    margin-bottom: 15px;
}

.item-stock.in-stock {
    color: #28a745; /* Green for in stock */
}

.item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
}

.item-actions label {
    color: #555;
    font-weight: 500;
}

.item-quantity-input {
    width: 60px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    text-align: center;
    -moz-appearance: textfield; /* Remove arrows in Firefox */
}

.item-quantity-input::-webkit-outer-spin-button,
.item-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none; /* Remove arrows in Chrome/Safari */
    margin: 0;
}

.action-divider {
    color: #ccc;
}

.remove-item-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.remove-item-btn:hover {
    color: #dc3545; /* Red on hover for remove */
    text-decoration: underline;
}

.item-subtotal {
    flex-shrink: 0; /* Prevent subtotal from shrinking */
    text-align: right;
    font-size: 1.2em;
    font-weight: 700;
    color: #333;
    white-space: nowrap;
}

.item-subtotal .subtotal-label {
    font-size: 0.8em;
    color: #888;
    font-weight: 400;
    display: block;
    margin-bottom: 5px;
}

/* Cart Summary Card */
.cart-summary-card {
    flex: 1; /* Summary card takes remaining space */
    min-width: 280px; /* Minimum width for summary card */
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 20px;
    position: sticky; /* Sticky positioning for summary */
    top: 20px; /* Distance from top when scrolling */
    z-index: 10; /* Ensure it stays above other content */
    border: 1px solid #e0e0e0; /* Subtle border */
}

.cart-summary-message {
    background-color: #f0f8ff; /* Light blue background */
    border: 1px solid #cce5ff;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 0.9em;
    color: #0056b3;
    margin-bottom: 20px;
    line-height: 1.4;
}

.cart-summary-message .details-link {
    color: #007bff;
    font-weight: 500;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.cart-summary-message .details-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

.cart-subtotal {
    font-size: 1.3em;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    text-align: right;
}

.cart-subtotal .item-count {
    font-weight: 500;
}

.cart-subtotal .total-amount {
    color: #dc3545; /* Red for total amount */
    font-size: 1.2em;
}

.proceed-to-checkout-btn {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.1em;
    background-color: #f0c14b; /* Amazon yellow */
    color: #333;
    border: 1px solid #c9a74a;
}

.proceed-to-checkout-btn:hover {
    background-color: #e4b238;
}

/* Mobile subtotal summary (hidden on desktop) */
.cart-subtotal-summary-mobile {
    display: none; /* Hidden by default */
    background-color: #fff;
    border-top: 1px solid #eee;
    padding: 15px 20px;
    text-align: right;
    position: sticky; /* Sticky at bottom on mobile */
    bottom: 0;
    left: 0;
    right: 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 20;
}

.cart-subtotal-summary-mobile p {
    font-size: 1.2em;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.cart-subtotal-summary-mobile .total-amount {
    color: #dc3545;
}

.proceed-to-checkout-btn-mobile {
    width: 100%;
    padding: 12px 15px;
    font-size: 1em;
}


/* --- Responsive Adjustments for Cart Page --- */
@media (max-width: 992px) {
    .cart-content-wrapper {
        flex-direction: column;
        align-items: center;
    }
    .cart-items-list, .cart-summary-card {
        min-width: unset; /* Remove min-width to allow full flexibility */
        width: 100%; /* Take full width */
    }
    .cart-summary-card {
        order: -1; /* Move summary card to the top on smaller screens */
        position: static; /* Remove sticky behavior on smaller screens */
        margin-bottom: 20px;
    }
    .cart-page .section-title {
        text-align: center;
    }
    .cart-page .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .cart-subtotal-summary-mobile {
        display: block; /* Show on smaller screens */
    }
    .cart-summary-card .cart-subtotal,
    .cart-summary-card .proceed-to-checkout-btn {
        display: none; /* Hide these from the main summary card when mobile summary is active */
    }
    .cart-summary-card .cart-summary-message {
        margin-bottom: 0; /* Remove bottom margin if buttons are hidden */
    }
}

@media (max-width: 768px) {
    .cart-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .item-image {
        margin-bottom: 15px;
    }
    .item-details {
        text-align: center;
    }
    .item-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    .item-subtotal {
        width: 100%;
        text-align: center;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px dashed #eee; /* Add a dashed line to separate subtotal */
    }
    .item-subtotal .subtotal-label {
        display: inline;
        margin-right: 5px;
    }
}

@media (max-width: 480px) {
    .cart-items-list, .cart-summary-card {
        padding: 15px;
    }
    .cart-item {
        padding: 15px 0;
    }
    .item-image {
        width: 100px;
        height: 100px;
    }
    .item-title {
        font-size: 1.1em;
    }
    .item-price {
        font-size: 1em;
    }
    .item-quantity-input {
        width: 50px;
        padding: 6px;
    }
    .remove-item-btn {
        font-size: 0.85em;
    }
    .item-subtotal {
        font-size: 1.1em;
    }
    .cart-summary-card {
        padding: 15px;
    }
    .cart-summary-message {
        font-size: 0.85em;
        padding: 8px 12px;
    }
    .cart-subtotal-summary-mobile p {
        font-size: 1.1em;
    }
}
/* Quantity Control Buttons */
.quantity-control {
display: flex;
align-items: center;
border: 1px solid #ccc;
border-radius: 4px;
overflow: hidden;
height: 30px;
width: fit-content;
margin-right: 5px;
}

.item-quantity-input {
    width: 30px; /* Smaller input width */
    height: 100%;
    padding: 0 5px;
    border: none; /* Remove individual border */
    text-align: center;
    font-size: 0.95em;
    -moz-appearance: textfield; /* Remove arrows in Firefox */
    outline: none;
    background-color: #f8f8f8; /* Light background for input */
}

.item-quantity-input::-webkit-outer-spin-button,
.item-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none; /* Remove arrows in Chrome/Safari */
    margin: 0;
}

.qty-btn {
    background-color: #f0f0f0;
    border: none;
    width: 30px; /* Fixed width for buttons */
    height: 100%;
    font-size: 1.1em;
    cursor: pointer;
    color: #555;
    transition: background-color 0.2s ease, color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background-color: #e0e0e0;
    color: #333;
}

.qty-btn.minus-btn {
    border-right: 1px solid #ccc;
}

.qty-btn.plus-btn {
    border-left: 1px solid #ccc;
}


/* Save for Later Button */
.save-for-later-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease, text-decoration 0.2s ease;
    white-space: nowrap; /* Prevent wrapping */
}

.save-for-later-btn:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Continue Shopping Button (Main list) */
.continue-shopping-footer {
    padding-top: 20px;
    text-align: right; /* Align to the right */
    border-top: 1px solid #eee; /* Divider above button */
    margin-top: 20px;
}

.continue-shopping-btn-main {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
    padding: 10px 20px; /* Slightly smaller button than checkout */
    font-size: 1em;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.continue-shopping-btn-main:hover {
    background-color: #e0e0e0;
    color: #007bff; /* Accent color on hover */
    border-color: #bbb;
}


/* Empty Cart State */
.empty-cart-state {
    display: none; /* Hidden by default. Use JS or dynamic content to show/hide. */
    text-align: center;
    background-color: #fff;
    padding: 50px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    margin-top: 30px;
}

.empty-cart-icon {
    font-size: 6em;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-cart-state h2 {
    font-size: 2em;
    color: #333;
    margin-bottom: 15px;
}

.empty-cart-state p {
    font-size: 1.1em;
    color: #666;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.empty-cart-state .btn-primary {
    padding: 12px 25px;
    font-size: 1.1em;
}

/* Responsive adjustments for new elements */
@media (max-width: 992px) {
    .continue-shopping-footer {
        text-align: center; /* Center button on tablets */
    }
}

@media (max-width: 768px) {
    .item-actions {
        flex-direction: column; /* Stack actions on small phones */
        align-items: center;
        width: 100%;
    }
    .quantity-control {
        margin-right: 0;
        margin-bottom: 10px; /* Space between qty and buttons */
    }
    .action-divider {
        display: none; /* Hide dividers when actions stack */
    }
    .remove-item-btn, .save-for-later-btn {
        width: 100%; /* Make buttons full width */
        justify-content: center; /* Center text/icon */
        padding: 8px 0;
    }
    .cart-subtotal-summary-mobile {
        padding: 10px 15px;
    }
    .cart-subtotal-summary-mobile p {
        font-size: 1.1em;
    }
    .proceed-to-checkout-btn-mobile {
        font-size: 0.95em;
        padding: 10px 15px;
    }
}

@media (max-width: 480px) {
    .empty-cart-state {
        padding: 30px 15px;
    }
    .empty-cart-icon {
        font-size: 4em;
    }
    .empty-cart-state h2 {
        font-size: 1.5em;
    }
    .empty-cart-state p {
        font-size: 0.9em;
    }
    .empty-cart-state .btn-primary {
        font-size: 1em;
        padding: 10px 20px;
    }
}
/* --- Checkout Page Specific Styles --- */
.checkout-page {
    padding-top: 30px;
    padding-bottom: 50px;
}

.checkout-page .section-title {
    text-align: left;
    margin-bottom: 30px;
    padding-bottom: 10px;
    font-size: 2.2em;
}

.checkout-page .section-title::after {
    left: 0;
    transform: none;
}

.checkout-content-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
}

.checkout-sections {
    flex: 3; /* Main sections take more space */
    min-width: 550px; /* Minimum width for the sections column */
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 30px;
}

.checkout-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
}

.section-heading {
    font-size: 1.8em;
    font-weight: 700;
    color: #333;
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f0; /* Underline for heading */
    padding-bottom: 10px;
}

.checkout-divider {
    border: none;
    border-top: 1px dashed #e0e0e0; /* Dashed divider between sections */
    margin: 40px 0;
}

/* Form Styling */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 0.95em;
    color: #555;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1em;
    color: #333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box; /* Include padding in width */
}

.form-group input[type="text"]::placeholder,
.form-group input[type="tel"]::placeholder {
    color: #aaa;
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease; /* Ensure transition is here */
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.2); /* Slightly softer shadow */
    outline: none;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1; /* Make columns equal width */
    margin-bottom: 0; /* Remove bottom margin from inner groups */
}

.save-address-btn {
    background-color: #f0c14b; /* Amazon yellow */
    color: #333;
    border: 1px solid #c9a74a;
    padding: 12px 25px;
    font-size: 1.05em;
    margin-top: 20px;
}

.save-address-btn:hover {
    background-color: #e4b238;
}

/* Payment Method Section */
.payment-options {
    margin-top: 20px;
}

.payment-option {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    margin-bottom: 15px;
    padding: 15px;
    background-color: #fcfcfc;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.payment-option:hover {
    background-color: #f5f5f5;
    border-color: #c0c0c0;
}

.payment-option input[type="radio"]:checked + label + .payment-details-form {
    border-top-color: #007bff; /* Highlight border of active form */
}

.payment-option input[type="radio"]:checked + label::before {
    /* Add a subtle checkmark visual cue if possible (requires more complex CSS or JS,
       for simplicity, we'll just style the container more) */
}

.payment-option input[type="radio"]:checked ~ .payment-details-form {
    display: block; /* Ensure the JS toggle works correctly with this structure */
}

.payment-option:has(input[type="radio"]:checked) { /* Using :has() for parent styling */
    border-color: #007bff; /* Blue border for selected option */
    background-color: #eaf6ff; /* Light blue background for selected */
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1); /* Subtle shadow for selected */
}

.payment-option input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2); /* Make radio button slightly larger */
    vertical-align: middle;
}

.payment-option label {
    font-size: 1.1em;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    display: inline-block; /* Allow spacing for icon */
    vertical-align: middle;
}

.payment-option label .fas {
    color: #007bff;
    margin-right: 8px;
}

.payment-details-form {
    border-top: 1px solid #eee;
    margin-top: 15px;
    padding-top: 15px;
    padding-left: 25px; /* Indent details form */
}

.payment-details-form p {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 15px;
}

/* Order Items Preview (Review Section) */
.order-items-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); /* Responsive grid */
    gap: 20px;
    margin-top: 20px;
}

.order-item-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    background-color: #fcfcfc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    align-items: flex-start; /* Align content to the start */
    text-align: left; /* Align text to the start */
}

.order-item-card img {
    max-width: 80px; /* Slightly smaller image */
    max-height: 80px;
    object-fit: contain;
    margin-bottom: 10px;
    border: 1px solid #e0e0e0; /* Stronger border for image */
    border-radius: 4px;
    padding: 3px;
    flex-shrink: 0; /* Prevent image from shrinking if text is long */
}

.order-item-card .item-info {
    flex-grow: 1; /* Allow info to take space */
    margin-right: 10px; /* Space between info and price */
}

.order-item-card .item-name {
    font-size: 0.9em; /* Slightly smaller name */
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.4;
}
.order-item-card .item-qty {
    font-size: 0.8em; /* Slightly smaller quantity text */
    color: #888;
    margin-bottom: 5px;
}
.order-item-card .item-price {
     font-size: 0.95em; /* Match name size */
     font-weight: 700;
     color: #dc3545;
     white-space: nowrap; /* Prevent price from wrapping */
}

/* Adjust order-item-card display to be more like a row for each item within the card */
.order-item-card {
    display: flex; /* Use flex for internal layout */
    flex-direction: row; /* Layout content in a row */
    align-items: center; /* Vertically center content */
    gap: 10px; /* Space between image and info */
    padding: 10px 15px; /* Adjust padding */
}

.shipping-method-info {
    font-size: 0.95em;
    color: #555;
    margin-top: 25px;
    text-align: center;
    background-color: #e6f7ff;
    border: 1px solid #91d5ff;
    border-radius: 5px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.shipping-method-info .fas {
    color: #007bff;
}


/* Order Summary Card */
.order-summary-card {
    flex: 1; /* Summary card takes remaining space */
    min-width: 300px; /* Minimum width for summary card */
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 25px;
    position: sticky; /* Sticky positioning for summary */
    top: 20px; /* Distance from top when scrolling */
    z-index: 10;
    border: 1px solid #e0e0e0;
}

.place-order-btn {
    width: 100%;
    padding: 18px 25px; /* Larger button */
    font-size: 1.25em; /* Larger font */
    background-color: #ff9900; /* Distinct orange for final order button */
    color: #fff;
    border: 1px solid #cc7a00;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    margin-bottom: 15px;
     transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.place-order-btn:hover {
    background-color: #e68a00;
    box-shadow: 0 5px 15px rgba(255, 153, 0, 0.4); /* Orange shadow on hover */
    transform: translateY(-2px); /* Slight lift on hover */
}

.order-summary-disclaimer {
    font-size: 0.85em;
    color: #888;
    text-align: center;
    margin-bottom: 20px;
}

.order-summary-disclaimer a {
    color: #007bff;
    transition: color 0.2s ease;
}

.order-summary-disclaimer a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.summary-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 20px 0;
}

.summary-heading {
    font-size: 1.5em;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1em;
    color: #555;
}

.summary-line.total-line {
    font-size: 1.4em; /* Slightly larger */
    font-weight: 900; /* Bolder */
    color: #1a1a1a; /* Darker for emphasis */
    padding-top: 12px; /* More padding */
    border-top: 2px solid #ddd; /* Thicker border */
    margin-top: 20px; /* More margin */
}

.summary-line.total-line .total-amount {
    color: #dc3545; /* Keep red */
    font-size: 1.2em; /* Slightly larger */
}

.summary-line.savings-line {
    font-size: 0.9em;
    color: #28a745; /* Green for savings */
    font-weight: 500;
    margin-top: 10px;
    border-top: 1px solid #e0e0e0;
    padding-top: 10px;
}


/* --- Responsive Adjustments for Checkout Page --- */
@media (max-width: 992px) {
    .checkout-content-wrapper {
        flex-direction: column;
        align-items: center;
    }
    .checkout-sections, .order-summary-card {
        min-width: unset;
        width: 100%;
    }
    .order-summary-card {
        order: -1; /* Move summary card to the top on smaller screens */
        position: static; /* Remove sticky behavior on smaller screens */
        margin-bottom: 30px;
    }
    .checkout-page .section-title {
        text-align: center;
    }
    .checkout-page .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .checkout-section .section-heading {
        text-align: center;
    }
    .form-row {
        flex-direction: column; /* Stack form rows vertically */
        gap: 0;
    }
    .form-row .form-group {
        width: 100%; /* Take full width when stacked */
    }
    .order-items-preview {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* More compact grid on smaller screens */
    }
    .order-items-preview {
        grid-template-columns: 1fr; /* Stack items vertically on tablets/mobiles */
        gap: 15px; /* Reduce gap when stacked */
    }
    .order-item-card {
        flex-direction: row; /* Keep row layout even when stacked */
        justify-content: space-between; /* Spread items across */
    }
    .order-item-card .item-info {
        text-align: left;
        margin-right: 0;
    }
    .order-item-card img {
         max-width: 60px;
         max-height: 60px;
    }
}

@media (max-width: 576px) {
    .checkout-sections, .order-summary-card {
        padding: 20px;
    }
    .checkout-page .section-title {
        font-size: 1.8em;
    }
    .section-heading {
        font-size: 1.5em;
    }
    .form-group input, .form-group select {
        padding: 10px 12px;
        font-size: 0.95em;
    }
    .save-address-btn {
        font-size: 0.95em;
        padding: 10px 20px;
    }
    .payment-option label {
        font-size: 1em;
    }
    .payment-details-form {
        padding-left: 15px;
    }
    .place-order-btn {
        font-size: 1.1em;
        padding: 15px 20px;
    }
    .summary-heading {
        font-size: 1.3em;
    }
    .summary-line {
        font-size: 0.9em;
    }
    .summary-line.total-line {
        font-size: 1.1em;
    }
    .order-item-card {
        padding: 10px;
    }
}

/* --- Order Confirmation Page Specific Styles --- */
.order-confirmation-page {
    padding-top: 50px;
    padding-bottom: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px); /* Adjust based on header/footer height */
}

.confirmation-card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15); /* More prominent shadow */
    padding: 40px;
    text-align: center;
    max-width: 700px; /* Max width for the card */
    width: 100%;
    border: 1px solid #e0e0e0;
}

.confirmation-icon {
    font-size: 5em; /* Large checkmark icon */
    color: #28a745; /* Green for success */
    margin-bottom: 25px;
    animation: fadeInScale 0.8s ease-out; /* Animation for icon */
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.confirmation-title {
    font-size: 2.8em;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.confirmation-message {
    font-size: 1.1em;
    color: #555;
    line-height: 1.7;
    margin-bottom: 30px;
}

/* Order Details Summary */
.order-details-summary {
    background-color: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: left;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
    color: #555;
}

.detail-value {
    color: #333;
    font-weight: 400;
}

.detail-value.total-amount {
    font-weight: 700;
    color: #dc3545; /* Red for total */
    font-size: 1.1em;
}

/* Next Steps Section */
.next-steps-section {
    background-color: #e6f7ff; /* Light blue background */
    border: 1px solid #91d5ff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 40px;
    text-align: left;
}

.next-steps-section h2 {
    font-size: 1.6em;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 20px;
    text-align: center;
}

.next-steps-section ul {
    list-style: none;
}

.next-steps-section ul li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    color: #444;
    font-size: 1em;
    line-height: 1.5;
}

.next-steps-section ul li .fas {
    color: #007bff;
    font-size: 1.2em;
    flex-shrink: 0;
    margin-top: 2px; /* Align icon with text */
}

.next-steps-section .link-text {
    color: #007bff;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.next-steps-section .link-text:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Action Buttons at bottom */
.continue-shopping-btn-conf,
.view-orders-btn-conf {
    padding: 12px 25px;
    font-size: 1.05em;
    margin: 0 10px 15px; /* Space between buttons and bottom margin */
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.continue-shopping-btn-conf {
    background-color: #007bff;
    color: #fff;
}

.continue-shopping-btn-conf:hover {
    background-color: #0069d9;
}

.view-orders-btn-conf {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}

.view-orders-btn-conf:hover {
    background-color: #e0e0e0;
    color: #007bff;
    border-color: #bbb;
}


/* --- Responsive Adjustments for Order Confirmation Page --- */
@media (max-width: 768px) {
    .confirmation-card {
        padding: 30px;
    }
    .confirmation-icon {
        font-size: 4em;
    }
    .confirmation-title {
        font-size: 2em;
    }
    .confirmation-message {
        font-size: 1em;
    }
    .order-details-summary, .next-steps-section {
        padding: 20px;
    }
    .next-steps-section h2 {
        font-size: 1.4em;
    }
    .next-steps-section ul li {
        font-size: 0.95em;
        gap: 10px;
    }
    .continue-shopping-btn-conf, .view-orders-btn-conf {
        width: 100%; /* Make buttons full width */
        margin: 10px 0; /* Stack buttons vertically */
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .confirmation-card {
        padding: 20px;
    }
    .confirmation-icon {
        font-size: 3em;
    }
    .confirmation-title {
        font-size: 1.5em;
    }
    .confirmation-message {
        font-size: 0.9em;
    }
    .order-details-summary, .next-steps-section {
        padding: 15px;
    }
    .next-steps-section h2 {
        font-size: 1.2em;
    }
    .next-steps-section ul li {
        font-size: 0.85em;
    }
    .continue-shopping-btn-conf, .view-orders-btn-conf {
        font-size: 0.9em;
        padding: 10px 15px;
    }
}

/* --- Login/Signup/Account Page Specific Styles --- */
.auth-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 200px); /* Adjust based on header/footer height */
    padding: 60px 20px;
    background: linear-gradient(135deg, #e0f7fa 0%, #cceeff 100%); /* Fresh, inviting light blue gradient */
    position: relative;
    overflow: hidden;
    /* Adding subtle animated background elements */
}

/* Animated background blobs for visual interest */
.auth-page::before, .auth-page::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.15; /* Slightly more visible */
    filter: blur(60px); /* Increased blur */
    z-index: 0; /* Ensure they are behind the card */
}

.auth-page::before {
    width: 300px; /* Larger */
    height: 300px;
    top: -80px; /* Further out */
    left: -80px;
    background: linear-gradient(45deg, #00bcd4, #26c6da); /* Cyan gradient */
    animation: moveBlob1 18s infinite alternate ease-in-out; /* Smoother animation */
}

.auth-page::after {
    width: 350px; /* Larger */
    height: 350px;
    bottom: -100px; /* Further out */
    right: -100px;
    background: linear-gradient(135deg, #ffc107, #ffeb3b); /* Amber gradient */
    animation: moveBlob2 20s infinite alternate-reverse ease-in-out; /* Smoother animation */
}

@keyframes moveBlob1 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(70px, 70px) scale(1.05); }
    100% { transform: translate(0, 0) scale(1); }
}

@keyframes moveBlob2 {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-70px, -70px) scale(1.05); }
    100% { transform: translate(0, 0) scale(1); }
}


.auth-card {
    background-color: #ffffff;
    border-radius: 20px; /* Even more rounded, softer look */
    box-shadow: 0 20px 50px rgba(0,0,0,0.25), 0 8px 20px rgba(0,0,0,0.1); /* Deeper, more elegant shadow */
    padding: 55px; /* More generous padding */
    width: 100%;
    max-width: 520px; /* Wider card for better form layout */
    text-align: center;
    border: 1px solid #b3e5fc; /* Softer, light blue border */
    position: relative;
    z-index: 1; /* Ensure card is above background elements */
    animation: fadeInScale 0.8s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smoother, more pronounced entry animation */
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(60px); /* Deeper starting point, more scale */
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.auth-title {
    font-size: 2.8em; /* Larger, more impactful */
    font-weight: 900; /* Super bold */
    color: #0d47a1; /* Darker, richer blue for headings */
    margin-bottom: 45px; /* More spacing */
    text-shadow: 2px 3px 5px rgba(0,0,0,0.1); /* More pronounced, softer text shadow */
    letter-spacing: -0.8px; /* Tighter letter spacing for boldness */
}

/* Input field enhancements */
.form-group label {
    font-weight: 600; /* Make labels bolder */
    color: #455a64; /* Darker grey for labels */
    margin-bottom: 10px; /* More space below label */
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"],
.form-group input[type="tel"] { /* Include tel for consistency */
    width: 100%;
    padding: 16px 20px; /* More comfortable padding */
    border: 2px solid #cfd8dc; /* Slightly thicker, softer border */
    border-radius: 10px; /* More rounded inputs */
    font-size: 1.1em; /* Slightly larger text */
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease; /* Smooth transition for focus */
    background-color: #fcfdfe; /* Very light background for inputs */
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.08); /* Subtle inner shadow */
}

.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus {
    border-color: #1976d2; /* Deeper primary blue on focus */
    box-shadow: 0 0 0 5px rgba(25, 118, 210, 0.25), inset 0 1px 3px rgba(0,0,0,0.15); /* More prominent, softer glow + inner shadow */
    background-color: #ffffff; /* White background on focus */
    outline: none;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px; /* Increased margin */
    font-size: 1em; /* Slightly larger font */
}

/* Custom checkbox styling (reusing and slightly refining) */
.checkbox-container {
    padding-left: 30px; /* More space for checkmark */
    font-size: 1em;
    color: #546e7a; /* Darker text color */
}

.checkmark {
    height: 22px; /* Larger */
    width: 22px; /* Larger */
    background-color: #e0e0e0; /* Lighter grey for unchecked */
    border-color: #9e9e9e; /* Softer border for unchecked */
    transition: all 0.25s ease-in-out;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #bdbdbd;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #1976d2; /* Deeper blue for checked */
    border-color: #1976d2;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3); /* Subtle shadow */
}

.checkmark:after {
    left: 8px; /* Adjust position for larger checkbox */
    top: 4px;
    width: 6px;
    height: 12px;
}

.forgot-password {
    color: #1976d2; /* Deeper blue */
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
    font-weight: 500;
}

.forgot-password:hover {
    color: #0d47a1; /* Even deeper blue on hover */
    text-decoration: underline;
}

.auth-btn {
    width: 100%;
    padding: 20px; /* Even larger padding */
    font-size: 1.45em; /* Even larger font */
    font-weight: 700; /* Bolder */
    margin-top: 30px; /* More spacing */
    background: linear-gradient(90deg, #1976d2 0%, #2196f3 100%); /* Vibrant blue gradient */
    color: #fff;
    border: none;
    border-radius: 12px; /* More rounded */
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smoother, more exciting transition */
    box-shadow: 0 8px 25px rgba(25, 118, 210, 0.5); /* Stronger initial shadow */
    letter-spacing: 0.8px; /* A little more letter spacing */
    text-transform: uppercase;
}

.auth-btn:hover {
    background: linear-gradient(90deg, #2196f3 0%, #1976d2 100%); /* Reverse gradient on hover */
    box-shadow: 0 12px 40px rgba(25, 118, 210, 0.7), 0 0 0 0.3rem rgba(25, 118, 210, 0.3); /* More prominent shadow + light glow */
    transform: translateY(-6px) scale(1.03); /* Lift more and slightly scale */
}

.auth-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

.auth-divider {
    margin: 45px 0; /* More vertical space */
    color: #b0bec5; /* Softer gray */
    font-size: 1.05em; /* Slightly larger */
}

.auth-divider::before,
.auth-divider::after {
    border-bottom: 1px solid #e0e0e0; /* Softer divider line */
}

.auth-switch-text {
    font-size: 1.05em; /* Slightly larger */
    color: #546e7a; /* Darker gray */
    margin-top: 40px; /* More spacing */
}

.auth-switch-text .link-text {
    color: #1976d2; /* Deeper blue */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.auth-switch-text .link-text:hover {
    color: #0d47a1; /* Even deeper blue on hover */
    text-decoration: underline;
}


/* --- Account Page Specific Styles (minor tweaks to match new aesthetic) --- */
.account-page {
    background: linear-gradient(135deg, #f8fbfd 0%, #edf2f7 100%); /* Lighter, subtle gradient background */
}
.account-page .section-title {
    font-size: 3em; /* Even larger */
    color: #0d47a1; /* Deeper blue */
}
.account-page .section-title::after {
    background-color: #1976d2; /* Match primary blue */
}

.account-dashboard {
    background-color: #ffffff;
    border-radius: 20px; /* More rounded */
    box-shadow: 0 20px 50px rgba(0,0,0,0.18), 0 8px 20px rgba(0,0,0,0.08); /* Deeper shadow */
    padding: 45px; /* More padding */
    border: 1px solid #e0e0e0;
}

.welcome-banner {
    background: linear-gradient(45deg, #80deea, #4dd0e1); /* Brighter, more inviting cyan gradient */
    border: 1px solid #26c6da;
    border-radius: 15px; /* More rounded */
    padding: 35px; /* More padding */
    margin-bottom: 50px; /* More space */
    box-shadow: 0 8px 25px rgba(0, 188, 212, 0.35); /* Stronger cyan shadow */
}

.welcome-banner .fas {
    font-size: 4.5em; /* Even larger icon */
    color: #00838f; /* Darker cyan */
    margin-bottom: 25px;
    animation: bounceIn 1.5s ease-out; /* Slightly longer animation */
}

.welcome-banner h2 {
    font-size: 2.4em; /* Larger title */
    color: #263238; /* Darker text */
}

.welcome-banner p {
    font-size: 1.15em; /* Larger text */
    color: #455a64;
}

.account-sections-grid {
    gap: 35px; /* More space between cards */
    margin-bottom: 60px; /* More space */
}

.account-card {
    border: 1px solid #e0e0e0;
    border-radius: 15px; /* More rounded */
    padding: 35px; /* More padding */
    box-shadow: 0 4px 15px rgba(0,0,0,0.08), 0 1px 5px rgba(0,0,0,0.03); /* Softer initial shadow */
}

.account-card:hover {
    box-shadow: 0 12px 35px rgba(0,0,0,0.2), 0 5px 15px rgba(0,0,0,0.1); /* More prominent shadow */
    transform: translateY(-8px); /* More lift */
    border-color: #4fc3f7; /* Light blue border on hover */
}

.account-card .fas {
    font-size: 3.2em; /* Larger icon */
    color: #78909c; /* Muted blue-gray */
    margin-bottom: 25px;
}

.account-card h3 {
    font-size: 1.8em; /* Larger title */
    font-weight: 600;
    color: #37474f; /* Darker text */
}

.account-card p {
    font-size: 1.05em; /* Slightly larger text */
    color: #607d8b;
    margin-bottom: 30px; /* More spacing */
}

.account-card .btn-link {
    border: 2px solid #0097a7; /* Deeper cyan for link buttons */
    color: #0097a7;
    padding: 12px 22px; /* More padding */
    font-size: 1.05em;
    border-radius: 8px; /* More rounded */
}

.account-card .btn-link:hover {
    background-color: #0097a7;
    box-shadow: 0 5px 15px rgba(0, 151, 167, 0.3);
}

.logout-section {
    margin-top: 50px; /* More spacing */
    padding-top: 35px;
    border-top: 1px dashed #cfd8dc;
}

.logout-section p {
    font-size: 1.1em;
    color: #546e7a;
    margin-bottom: 25px;
}

.logout-btn {
    padding: 16px 40px; /* More padding */
    font-size: 1.25em; /* Larger font */
    background: linear-gradient(90deg, #e53935 0%, #c62828 100%); /* Vibrant red gradient */
    box-shadow: 0 8px 25px rgba(229, 57, 53, 0.4);
}

.logout-btn:hover {
    background: linear-gradient(90deg, #c62828 0%, #b71c1c 100%);
    box-shadow: 0 12px 40px rgba(229, 57, 53, 0.6), 0 0 0 0.3rem rgba(229, 57, 53, 0.3);
}


/* --- Responsive Adjustments for Auth & Account Pages --- */
@media (max-width: 768px) {
    .auth-card {
        padding: 40px 30px;
        margin: 20px auto;
        border-radius: 15px;
    }
    .auth-title {
        font-size: 2.4em;
        margin-bottom: 35px;
    }
    .auth-btn {
        padding: 18px;
        font-size: 1.25em;
    }
    .form-group input {
        padding: 14px 18px;
    }
    .form-options {
        margin-bottom: 30px;
    }
    .auth-divider {
        margin: 35px 0;
    }
    .auth-switch-text {
        margin-top: 30px;
    }

    .account-page .section-title {
        font-size: 2.5em;
        margin-bottom: 45px;
    }
    .welcome-banner {
        padding: 30px;
        margin-bottom: 40px;
        border-radius: 12px;
    }
    .welcome-banner .fas {
        font-size: 4em;
    }
    .welcome-banner h2 {
        font-size: 2em;
    }
    .welcome-banner p {
        font-size: 1.05em;
    }
    .account-sections-grid {
        gap: 30px;
    }
    .account-card {
        padding: 30px;
        border-radius: 12px;
    }
    .account-card .fas {
        font-size: 2.8em;
    }
    .account-card h3 {
        font-size: 1.5em;
    }
    .account-card p {
        font-size: 0.95em;
        margin-bottom: 25px;
    }
    .account-card .btn-link {
        padding: 10px 20px;
        font-size: 1em;
    }
    .logout-section {
        margin-top: 40px;
        padding-top: 30px;
    }
    .logout-btn {
        padding: 14px 35px;
        font-size: 1.15em;
    }
}

@media (max-width: 480px) {
    .auth-card {
        padding: 30px 20px;
        border-radius: 10px;
    }
    .auth-title {
        font-size: 2em;
        margin-bottom: 30px;
    }
    .auth-btn {
        font-size: 1.15em;
        padding: 16px;
        border-radius: 8px;
    }
    .form-group input {
        padding: 12px 15px;
        font-size: 1em;
        border-radius: 8px;
    }
    .checkbox-container {
        font-size: 0.9em;
        padding-left: 25px;
    }
    .checkmark {
        height: 20px;
        width: 20px;
    }
    .checkmark:after {
        left: 7px;
        top: 3px;
        width: 6px;
        height: 10px;
    }
    .auth-switch-text {
        font-size: 0.9em;
        margin-top: 25px;
    }

    .account-page .section-title {
        font-size: 2em;
        margin-bottom: 35px;
    }
    .welcome-banner {
        padding: 25px;
        margin-bottom: 30px;
        border-radius: 10px;
    }
    .welcome-banner .fas {
        font-size: 3.5em;
    }
    .welcome-banner h2 {
        font-size: 1.8em;
    }
    .welcome-banner p {
        font-size: 0.95em;
    }
    .account-card {
        padding: 25px;
        border-radius: 10px;
    }
    .account-card .fas {
        font-size: 2.5em;
    }
    .account-card h3 {
        font-size: 1.3em;
    }
    .account-card p {
        font-size: 0.9em;
        margin-bottom: 20px;
    }
    .account-card .btn-link {
        padding: 8px 15px;
        font-size: 0.9em;
    }
    .logout-btn {
        padding: 12px 30px;
        font-size: 1.05em;
        border-radius: 8px;
    }
}