:root {
    --primary-color: #4B3621;
    --secondary-color: #654321;
    --accent-color: #8B5E3C;
    --bg-color: #FFF5E6;
    --text-color: #3E2723;
    --red-color: #AC3834;
    --red-color-hover: #881D1D;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Old Standard TT', serif;
    background: url('https://www.transparenttextures.com/patterns/old-paper.png');
    color: var(--text-color);
    line-height: 1.6;
}

/* Location page specific styles */
body.location-page .nav.scrolled {
    background: rgba(255, 255, 255, 0.25) !important;
}

body.location-page .nav.scrolled .hamburger-bar {
    background: var(--primary-color);
}

/* Index page specific styles */
body.index-page .nav.scrolled {
    background: rgba(255, 255, 255, 0.25) !important;
}

body.index-page .nav.scrolled .hamburger-bar {
    background: var(--text-color);
}

/* Torn Paper Effects */
.section {
    position: relative;
    padding: 40px 20px;
    margin: 60px 20px;
    background: var(--bg-color);
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.section::before,
.section::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 30px;
    background-image: url('https://www.transparenttextures.com/patterns/torn-edge.png');
    background-size: cover;
    z-index: 1;
}

.section::before {
    top: -30px;
    transform: rotate(180deg);
}

.section::after {
    bottom: -30px;
}

.header {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('assets/img/header.JPG');
    height: 100vh;
    background-size: cover;
    background-position: center;
    position: relative;
}

.nav {
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    /* Initial transparent state */
    background: transparent;
    backdrop-filter: none;
    border-bottom: 1px solid transparent;
}

.nav.scrolled {
    /* Glassmorphic effect */
    background: rgba(255, 255, 255, 0.511) !important;
    backdrop-filter: blur(15px) saturate(180%) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.nav.scrolled .nav-links a {
    color: var(--primary-color);
}

.nav.scrolled .nav-links a:hover {
    color: var(--secondary-color);
}

.logo {
    position: relative;
    display: flex;
    align-items: center;
    /* max-width: 40px;
    height: 40px; */
}

.logo img {
    height: 40px;
    position: absolute;
    transition: all 0.4s ease-in-out;
}

.logo-default {
    opacity: 1;
    visibility: visible;
}

.logo-default,
.logo-scrolled {
    transition: all 0.4s ease-in-out !important;
}

.logo-scrolled {
    opacity: 0;
    visibility: hidden;
}

.nav.scrolled .logo-default {
    opacity: 0 !important;
    visibility: hidden !important;
}

.nav.scrolled .logo-scrolled {
    opacity: 1 !important;
    visibility: visible !important;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--bg-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.hamburger {
    display: none; /* Hidden by default */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    position: relative;
    width: 35px;
    height: 25px;
}

.hamburger span {
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--bg-color);
    border-radius: 2px;
    left: 0;
    transition: all 0.3s ease;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 10px; }
.hamburger span:nth-child(3) { top: 20px; }

.nav.scrolled .hamburger span {
    background: var(--primary-color);
}

.hamburger-bar {
    background: var(--bg-color); /* Initial color */
    transition: all 0.3s ease;
}

/* Active state color */
.hamburger.active .hamburger-bar {
    background: var(--primary-color); /* Coffee brown color */
}

/* Scrolled state color */
.nav.scrolled .hamburger-bar {
    background: var(--primary-color);
}

.nav.scrolled .hamburger.active .hamburger-bar {
    background: var(--text-color); /* Dark brown color */
}

.color-transition .hamburger-bar {
    transition: background-color 0.3s ease;
}

img[alt="Coffee bean"] {
    /* filter: sepia(100%) brightness(90%); */
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.hero {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

.hero h1 {
    font-family: 'Shadows Into Light', cursive;
    font-size: 4rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Story Timeline */
.story-timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0;
}

.timeline-item {
    padding: 20px 40px;
    margin: 50px 0;
    border-left: 3px solid var(--primary-color);
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    border: 3px solid var(--primary-color);
}

/* Production Process */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding: 40px 0;
}

.process-step {
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.8);
    border-radius: 5px;
    position: relative;
}

.process-step i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    padding: 40px 20px;
    transition: all;
}

.product-card {
    background: white;
    padding: 20px;
    text-align: center;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.product-card.hidden {
    opacity: 0;
    transform: scale(0.9);
    height: 0;
    padding: 0;
    margin: 0;
    border: 0;
    overflow: hidden;
}

.product-card:hover {
    transform: translateX(5px);
}

.product-card img {
    width: auto;
    height: 250px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* .product-card img:hover {
    transform: scale(1.05);
    transition: all 0.3s ease-in-out;
} */

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 35px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 0;
    border: 2px solid var(--secondary-color);
    font-family: 'Cinzel Decorative', cursive;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
    cursor: pointer;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

/* Modify the view more button styles */
#products {
    position: relative;
    padding-bottom: 100px; /* Add space for the button */
}

.view-more-container {
    position: absolute;
    bottom: 30px;
    right: 30px;
    text-align: right;
}

.btn-view-more {
    padding: 12px 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color);
    border: 2px solid var(--secondary-color);
    transition: all 0.3s ease;
}

.btn-view-more:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-view-more i {
    font-size: 0.9em;
    transition: transform 0.3s ease;
}

.btn-view-more:hover i {
    transform: translateX(4px);
}

/* Remove previous loading animation styles */

/* Product Modal */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background: var(--bg-color) url('https://www.transparenttextures.com/patterns/paper.png');
    margin: 2% auto;
    padding: 30px;
    max-width: 1200px;
    border-radius: 5px;
    position: relative;
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
    border: 2px solid var(--primary-color);
}

.close-modal {
    position: absolute;
    right: 25px;
    top: 25px;
    font-size: 35px;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1;
}

.close-modal:hover {
    color: var(--secondary-color);
    transform: rotate(90deg);
}

.modal-title {
    word-wrap: break-word;
    hyphens: auto;
    max-width: 90%;
}

.product-desc {
    overflow-wrap: break-word;
    line-height: 1.6;
}

.resize-animation-stopper * {
    animation: none !important;
    transition: none !important;
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.modal-image-container {
    position: relative;
    width: 100%;
    padding-top: 140%;
    background: rgba(255,255,255,0.9);
    border-radius: 5px;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.1);
}

.modal-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
    box-sizing: border-box;
    filter: sepia(30%) contrast(110%);
}

/* .modal-image img {
    width: auto;
    height: 80%;
    object-fit: cover;
    border-radius: 5px;
} */

.modal-details {
    height: 100%;
    display: flex;
    flex-direction: column;
    /* justify-content: space-between; */
    /* min-height: 0; */
    gap: 20px;
}

.product-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9em;
    color: var(--secondary-color);
}

/* .product-ingredients {
    margin: 20px 0;
    padding: 15px;
    overflow-wrap: break-word;
    hyphens: auto;
    border-top: 2px dashed var(--accent-color);
    border-bottom: 2px dashed var(--accent-color);
} */

.product-ingredients {
    border-top: 2px dashed var(--accent-color);
    padding-top: 20px;
}

.ingredients-list {
    columns: 2;
    margin: 15px 0;
    padding-left: 20px;
}

.ingredients-list li {
    margin-bottom: 8px;
}

/* .product-actions {
    display: flex;
    gap: 10px;
}

.view-details {
    background: var(--accent-color);
    border-color: var(--secondary-color);
}

.view-details:hover {
    background: var(--secondary-color);
} */

/* Footer Styles */
.footer {
    background: url('https://www.transparenttextures.com/patterns/old-paper.png');
    position: relative;
    padding: 80px 20px 30px;
    margin-top: 100px;
    border-top: 2px solid var(--primary-color);
}

.footer::before {
    content: '';
    position: absolute;
    top: -30px;
    left: 0;
    right: 0;
    height: 30px;
    background-image: url('https://www.transparenttextures.com/patterns/torn-edge.png');
    background-size: cover;
    transform: rotate(180deg);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h4 {
    font-family: 'Cinzel Decorative', cursive;
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px dashed var(--accent-color);
    padding-bottom: 10px;
}

.footer-links li {
    margin: 10px 0;
}

.footer-links a {
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
}

.footer-links a:hover {
    color: var(--accent-color);
    margin-left: 5px;
}

.footer-links i {
    margin-right: 8px;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.social-links a {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s;
}

.social-links a:hover {
    transform: translateY(-3px);
}

.newsletter input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    background: rgba(255,255,255,0.8);
    border: 1px solid var(--primary-color);
    font-family: 'Old Standard TT', serif;
}

.btn-newsletter {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.footer-bottom p {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.footer-divider {
    width: 100px;
    opacity: 0.7;
    margin: 20px 0;
    filter: sepia(100%);
}

/* Locations Page Styles */

.location-grid {
    display: grid;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.location-card {
    background: var(--bg-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 5px;
    overflow: hidden;
}

.location-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-bottom: 3px solid var(--primary-color);
}

.location-info {
    padding: 25px;
}

.location-details p {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.location-details i {
    color: var(--primary-color);
    min-width: 25px;
    text-align: center;
}

.location-cta {
    margin-top: 25px;
    border-top: 2px dashed var(--accent-color);
    padding-top: 20px;
}

.location-features {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.location-features span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.location-map iframe {
    width: 100%;
    height: 300px;
    border: 0;
    filter: grayscale(30%) sepia(20%);
}

.cta-section {
    background: url('https://www.transparenttextures.com/patterns/cardboard.png');
}

.cta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.cta-card {
    text-align: center;
    padding: 30px;
    background: rgba(255,255,255,0.9);
    border-radius: 5px;
}

.cta-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Products Page Styles */
.products-page .header {
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('assets/img/header.JPG') !important;
    background-size: cover !important;
    background-position: center !important;
}

.products-page .nav.scrolled .logo-default {
    opacity: 0 !important;
    visibility: hidden !important;
}

.products-page .nav.scrolled .logo-scrolled {
    opacity: 1 !important;
    visibility: visible !important;
}

.products-page .nav.scrolled .hamburger-bar {
    background: var(--primary-color) !important;
}

.products-page .hamburger-bar {
    background: var(--bg-color);
}

.product-categories {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 30px 0;
}

.category-filter {
    padding: 8px 20px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-filter.active,
.category-filter:hover {
    background: var(--primary-color);
    color: var(--bg-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    padding: 20px;
}

.product-card {
    background: var(--bg-color);
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.product-image {
    position: relative;
    height: 250px;
}

.product-image img {
    width: auto;
    height: 100%;
    object-fit: cover;
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.product-info {
    padding: 20px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.product-price {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.btn-cart {
    padding: 8px 20px;
    font-size: 0.9rem;
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.product-features {
    background: url('https://www.transparenttextures.com/patterns/paper.png');
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Cart Page Styles */
.cart-section {
    max-width: 1200px;
    margin: 0 auto;
}

.cart-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 20px;
    padding: 20px;
    background: var(--bg-color);
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
}

.item-image {
    width: 100px;
    height: 100px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-quantity {
    width: 35px;
    height: 35px;
    border: 1px solid var(--primary-color);
    background: transparent;
    cursor: pointer;
    border-radius: 50%;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.btn-quantity:hover {
    background: var(--primary-color);
    color: white;
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    padding: 5px;
    font-family: inherit;
}

.item-price {
    font-family: 'Cinzel Decorative', cursive;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.btn-remove {
    position: absolute;
    /* top: 315px;
    right: 380px; */
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    opacity: 0.7;
}

.btn-remove:hover {
    color: var(--primary-color);
}

.cart-summary {
    background: var(--bg-color);
    padding: 25px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 20px;
}

.summary-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 25px 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed var(--accent-color);
}

.summary-row.total {
    font-weight: bold;
    border-bottom: none;
    font-size: 1.1rem;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-checkout {
    background: var(--primary-color);
    color: white;
    width: 100%;
    cursor: pointer;
}

.btn-continue {
    background: var(--accent-color);
    color: white;
}

/* Add these styles */
.cart-link {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-links .fa-shopping-cart {
    font-size: 1.2rem;
}

.cart-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { bottom: -50px; }
    to { bottom: 20px; }
}

.empty-cart {
    text-align: center;
    font-size: 1.2rem;
    color: var(--secondary-color);
    padding: 40px 0;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: var(--accent-color);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    min-width: 25px;
    text-align: center;
}

/* Checkout Page Styles */
.checkout-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.shipping-form {
    position: relative;
    background: var(--bg-color);
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.input-group input,
.input-group select,
.input-group textarea {
    padding: 12px;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    font-family: inherit;
    background: rgba(255,255,255,0.9);
}

.input-group textarea {
    resize: vertical;
    min-height: 100px;
}

.payment-methods {
    margin-top: 40px;
}

.payment-options {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.payment-option {
    display: block;
    position: relative;
}

.payment-option input {
    position: absolute;
    opacity: 0;
}

.payment-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 2px solid var(--primary-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-content i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.payment-option input:checked + .payment-content {
    background: var(--primary-color);
    color: white;
}

.payment-option input:checked + .payment-content i {
    color: white;
}

.order-summary {
    background: var(--bg-color);
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 20px;
}

.summary-items {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
}

.btn-clear {
    position: absolute;
    /* top: 315px;
    right: 380px; */
    font-size: 1.5rem;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: var(--red-color);
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    color: var(--red-color-hover);
}

.btn-confirm {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    background: var(--primary-color);
}

/* Loader styling */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #00000080; /* Adjust to your background */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
  }
  
  .loader-overlay.hidden {
    display: none;
  }  

@media (min-width: 1200px) {
    .modal-image {
        height: 600px;
    }
}

@media (max-width: 992px) {
    .nav {
        padding: 15px 20px;
    }

    .modal-grid {
        grid-template-columns: 1fr;
        /* gap: 25px; */
    }
    
    .modal-image-container {
        padding-top: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .ingredients-list {
        columns: 1;
    }

    .cart-container {
        grid-template-columns: 1fr;
    }
    
    .cart-summary {
        position: static;
    }

    .checkout-container {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }
    
    .order-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    /* .hamburger {
        display: block;
        order: 2;
    } */

    .hamburger {
        display: block !important; /* Force show on mobile */
        order: 2; /* Position after logo */
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background: var(--bg-color);
        flex-direction: column;
        padding: 80px 20px;
        transition: right 0.3s ease-in-out;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        color: var(--text-color) !important;
        padding: 15px 0;
        font-size: 1.2rem;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(8px, -8px);
    }

    .nav {
        padding: 15px 20px !important;
        justify-content: space-between;
    }

    .logo {
        max-width: 150px;
        height: auto;
    }

    .logo img {
        height: 35px !important;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .process-steps {
        grid-template-columns: 1fr;
    }

    #products {
        padding-bottom: 80px;
    }
    
    .view-more-container {
        position: static;
        text-align: center;
        margin-top: 30px;
    }
    
    .btn-view-more {
        width: 100%;
        justify-content: center;
    }

    /* Product Modal*/
    .product-modal {
        height: 105%;
        width: 100%;
    }

    .modal-content {
        width: 90%;
        height: 90%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .modal-details {
        font-size: 100%;
        /* gap: 10px; */
    }

    .modal-grid {
        grid-template-columns: 1fr;
        max-height: 85vh;
    }
    
    .modal-image-container {
        padding-top: 70%;
        max-width: 70%;
    }

    .modal-image {
        display: flex;
        justify-content: center;
        max-height: 30vh;
    }

    .modal-image img {
        width: 50%;
        height: auto;
    }
    
    .ingredients-list {
        columns: 2;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-links a:hover {
        margin-left: 0;
    }

    /* Locations Page Styles */
    .location-card {
        margin: 0 15px;
    }
    
    .location-features {
        flex-direction: column;
        gap: 10px;
    }
    
    .location-map iframe {
        height: 250px;
    }
    
    .cta-grid {
        grid-template-columns: 1fr;
    }

    /*products styling*/
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-footer {
        flex-direction: column;
        gap: 15px;
        margin-top: 0;
    }
    
    .product-meta {
        flex-direction: column;
        gap: 8px;
    }

    .cart-item {
        grid-template-columns: 1fr;
    }
    
    .item-image {
        width: 100%;
        height: 200px;
    }
    
    .item-controls {
        flex-direction: column;
        align-items: flex-start;
    }

    /* checkout page */
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-content {
        padding: 12px;
    }
}

@media (max-width: 576px) {
    .modal-details .product-meta .product-ingredients{
        font-size: 80%;
    }
    .product-modal {
        height: 105%;
    }

    .modal-content {
        padding: 20px;
        margin: 5% auto;
    }
    
    .close-modal {
        right: 15px;
        top: 15px;
        font-size: 28px;
    }
    
    .product-meta {
        flex-direction: column;
        gap: 10px;
    }

    .shipping-form,
    .order-summary {
        padding: 20px;
    }
    
    .input-group input,
    .input-group select,
    .input-group textarea {
        padding: 10px;
    }
}

/* iPhone SE and similar small devices */
@media (max-width: 380px) and (max-height: 670px) {
    .product-modal {
        height: 105vh;
    }

    .modal-content {
        padding: 15px;
        margin: 2% auto;
        width: 98%;
    }

    .close-modal {
        right: 10px;
        top: 10px;
        font-size: 24px;
    }

    .modal-grid {
        gap: 15px;
    }

    .modal-image-container {
        padding: 30%;
        width: calc(100% + 20px);
    }

    .modal-image-container img {
        /* width: 100%; */
        padding: 0;
    }

    .modal-details {
        gap: 15px;
    }

    .modal-title {
        font-size: 1.4rem;
        /* line-height: 1.3; */
    }

    .product-meta {
        flex-direction: column;
        gap: 8px;
        margin: 0;
    }

    .product-desc {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .product-ingredients h4 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }

    .ingredients-list {
        font-size: 0.85rem;
        padding-left: 15px;
    }

    .ingredients-list li {
        margin-bottom: 6px;
    }

    .btn-cart {
        padding: 10px 15px;
        font-size: 0.85rem;
    }

    .product-price {
        font-size: 1.1rem;
    }

    /* Better touch targets */
    .btn {
        min-width: 120px;
        padding: 12px 20px;
    }

    .cart-item {
        padding: 15px;
    }
    
    .quantity-selector {
        gap: 3px;
    }
    
    .btn-quantity {
        width: 30px;
        height: 30px;
    }
    
    .quantity-input {
        width: 40px;
    }
    
    .cart-actions .btn {
        font-size: 0.9rem;
        padding: 12px;
    }

    /* .hero h1 {
        font-size: 1.8rem;
    } */
    
    .payment-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Extreme small height devices */
@media (max-height: 600px) and (max-width: 375px) {
    .modal-content {
        margin: 0 auto;
        max-height: 98vh;
    }
    
    .modal-image-container {
        padding-top: 120%;
    }
    
    .modal-details {
        max-height: 50vh;
        overflow-y: auto;
    }

    .item-image {
        height: 150px;
    }
    
    .item-details h3 {
        font-size: 1.1rem;
    }
    
    .item-price {
        font-size: 1rem;
    }
    
    .summary-row {
        font-size: 0.9rem;
    }
    
    .btn-remove {
        top: 5px;
        right: 5px;
    }
}

/* Touch Optimization */
.modal-details::-webkit-scrollbar {
    width: 6px;
}

.modal-details::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.resize-animation-stopper * {
    animation: none !important;
    transition: none !important;
}
