:root {
    --primary: #f97316;
    /* Updated to Orange */
    --primary-dark: #ea580c;
    --secondary: #64748b;
    --accent: #f97316;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --success: #22c55e;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.text-center {
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: var(--primary);
    color: white;
    text-align: center;
}

.btn:hover {
    background: #dd640f;
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-secondary:hover {
    background: var(--border);
}

/* Forms */
.form-control {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-main);
    font-size: 1rem;
    margin-top: 0.25rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.auth-form {
    max-width: 400px;
    margin: 4rem auto;
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Header */
header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    /* Logo image replacement styling */
    display: flex;
    align-items: center;
}


.logo img {
    height: 48px;
    /* Adjust based on logo aspect ratio */
    width: auto;
    transition: all 0.3s ease;
}

.logo .mobil-logo {
    display: none;
}

/* Header Scroll Effect (Mobile Only per request but good practice generally) */
@media (max-width: 768px) {
    .main-header {
        transition: all 0.3s ease;
        padding: 1rem 0;
        /* Default padding */
    }

    .main-header.scrolled {
        padding: 0.5rem 0;
        /* Shrink header slightly but keep it balanced */
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .main-header.scrolled .desktop-logo {
        display: none;
    }

    .main-header.scrolled .mobil-logo {
        display: block;
        height: 40px;
        width: auto;
        /* Smaller mobile logo */
        margin-right: auto;
    }

    .logo img {
        height: 48px;
        /* Ensure default is correct */
    }
}


.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;

}

.nav-links a:hover,
.nav-links a.active {
    color: rgb(100, 100, 255);
}

.cart-count {
    background: var(--secondary);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 99px;
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.4rem;
    padding: 0;
}

.product-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #f1f5f9;
}

.product-info {
    padding: 10px;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: #166534;
}

/* Table */
.location-map-container {
    height: 300px;
    background: #eee;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

/* Saved Addresses Quick Select */
.saved-addresses-quick {
    margin-bottom: 1rem;
}

.saved-list {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 5px;
}

.saved-addr-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    min-width: 160px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.saved-addr-item:hover {
    background: #eef2ff;
    border-color: #6366f1;
}

.saved-addr-item .icon {
    color: #6366f1;
    font-size: 1.1rem;
}

.saved-addr-item .text {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
}

.saved-addr-item .text strong {
    color: #1f2937;
    margin-bottom: 2px;
}

.saved-addr-item .text span {
    color: #6b7280;
    font-size: 0.75rem;
}

/* Scrollbar for list */
.saved-list::-webkit-scrollbar {
    height: 4px;
}

.saved-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.saved-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.cart-table th,
.cart-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.cart-table th {
    background: #f8fafc;
    font-weight: 600;
    color: var(--text-muted);
}

/* Autocomplete Dropdown */
.autocomplete-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    text-align: left;
    color: var(--text-main);
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background-color: #f1f5f9;
    color: var(--primary);
}



/* Shop Layout */
.shop-layout {
    display: grid;
    grid-template-columns: 250px 1fr 300px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .shop-layout {
        grid-template-columns: 200px 1fr 250px;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .shop-layout {
        display: flex;
        flex-direction: column;
    }

    .category-sidebar {
        display: none;
        /* Hide on mobile for now or make scrollable top bar */
    }
}

.sticky-sidebar {
    position: sticky;
    top: 5rem;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
}

.category-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    border-radius: 8px;
    margin-bottom: 0.25rem;
    transition: all 0.2s;
    font-weight: 500;
}

.category-nav-link:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.category-nav-link.active {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    font-weight: 600;
    border-left: 3px solid var(--primary);
}

.cart-item-mini {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f1f1;
}

/* Footer Styles */
.site-footer {
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    padding-top: 4rem;
    padding-bottom: 2rem;
    margin-top: 4rem;
    color: #64748b;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-column h4 {
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.75rem;
}

.footer-column ul li a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-column ul li a:hover {
    color: #2563eb;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: white;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s;
}

.social-icon:hover {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #e2e8f0;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .links-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .app-download-section {
        flex-direction: column;
        gap: 1.5rem;
    }

    .app-buttons {
        border-right: none;
        padding-right: 0;
        border-bottom: 1px solid #e2e7e9;
        padding-bottom: 1.5rem;
        width: 100%;
        align-items: center;
    }

    .qr-area {
        padding-left: 0;
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
}

.app-download-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.app-buttons {
    display: flex;
    border-right: 1px solid #e2e7e9;
    flex-direction: column;
    padding: 0 32px 0 0;
}

.app-buttons a.app-btn {
    margin: 0 0 16px;
}

.app-buttons a.app-btn img {
    height: 53px;
    width: 180px;
}

.qr-area {
    display: inline-flex;
    align-items: center;
    padding-left: 32px;
}

img.qr-code {
    height: 100px;
    width: 100px;
}

/* Header Address Bar */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.header-address-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border-radius: 50px;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    margin-right: auto;
    margin-left: 2rem;
    transition: all 0.2s;
}

.header-address-trigger:hover {
    background: #eff6ff;
    border-color: var(--primary);
}

.header-address-trigger .icon-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.header-address-trigger .address-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header-address-trigger .address-text .label {
    font-size: 0.7rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 600;
}

.header-address-trigger .address-text .value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.header-address-trigger .fa-chevron-down {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-left: 0.5rem;
}

/* Location Modal */
.location-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.location-modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.location-modal-content {
    position: relative;
    background: white;
    width: 90%;
    max-width: 800px;
    height: 80vh;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.location-modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    z-index: 10;
}

.location-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.location-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #1f2937;
}

.location-modal-header p {
    margin: 0.5rem 0 0;
    color: #64748b;
    font-size: 0.9rem;
}

.location-search-container {
    overflow: overlay;
    flex-direction: column;
    padding: 1rem 1.5rem;
    display: flex;
    gap: 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
}

/* Input with Icon Wrapper */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    background: #f9fafb;
    margin-bottom: 1rem;
}

.input-with-icon i.fa-search {
    color: #9ca3af;
    margin-right: 0.5rem;
}

.input-with-icon input {
    border: none;
    background: transparent;
    width: 100%;
    outline: none;
    font-size: 0.95rem;
    color: #1f2937;
    padding-right: 2rem;
    /* Space for clear button */
}

.input-with-icon #clear-address-input {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.25rem;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.2s;
    background: #f9fafb;
    /* Match container bg to hide text behind if needed */
}

.input-with-icon #clear-address-input:hover {
    color: #ef4444 !important;
}

.location-map-container {
    flex: 1;
    position: relative;
    background: #e2e8f0;
}

.map-center-pin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
    /* Point to center */
    z-index: 5;
    color: var(--primary);
    font-size: 2.5rem;
    pointer-events: none;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.map-locate-btn {
    position: absolute;
    bottom: 2rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 5;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .header-address-trigger {
        margin-left: 0;
        width: 100%;
        margin-bottom: 1rem;
        order: 2;
        /* Put below logo on mobile if needed */
    }

    .nav-wrapper {
        flex-wrap: wrap;
    }

    .location-modal-content {
        height: 100%;
        width: 100%;
        border-radius: 0;
    }

    .location-search-container {
        flex-direction: column;
    }
}

/* Mobile Responsiveness & Hamburger Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
    padding: 0.5rem;
}

@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0.1rem 0;
    }

    /* Header Adjustments */
    .nav-wrapper {
        flex-wrap: wrap;
        padding: 0.5rem 0;
    }

    .mobile-menu-btn {
        margin-right: 25px;
        display: block;
        order: 3;
        /* Logo is 1, maybe make address 2 or hide it */
    }

    .logo {
        justify-content: flex-start;
        align-items: center;
        flex: 1;
        order: 1;
        margin-left: 1rem;
    }

    .logo img {
        width: 71%;
        height: auto;
        max-width: 145px;
    }

    .logo img.mobil-logo {
        width: 71%;
        height: auto;
        max-width: 35px;
        margin-right: auto;
    }

    /* Reset order for header address trigger to be below or hidden depending on design */
    .header-address-trigger {
        order: 2;
        width: 58%;
        margin: 0.2rem 0;
        margin-bottom: 0;
        margin-right: 10px;
    }

    .main-header.scrolled .header-address-trigger {
        width: 73%;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        order: 5;
        background: white;
        padding: 1rem 0;
        border-top: 1px solid var(--border);
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a.btn {
        display: block;
        text-align: center;
    }

    /* Shop Layout Adjustments */
    .shop-layout {
        display: block;
        /* Stack them */
    }

    .category-sidebar {
        display: block;
        /* Show it but styled differently */
        position: static;
        width: 100%;
        max-height: none;
        box-shadow: none;
        border: none;
        padding: 0 0 1rem 0;
        margin-bottom: 1rem;
        background: transparent;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .category-sidebar h3 {
        display: none;
        /* Hide title to save space */
    }

    #category-nav {
        display: flex;
        gap: 0.5rem;
        padding-bottom: 5px;
        /* For scrollbar */
    }

    .category-nav-link {
        display: inline-block;
        white-space: nowrap;
        background: white;
        border: 1px solid var(--border);
        padding: 0.5rem 1rem;
        border-radius: 20px;
        margin-bottom: 0;
    }

    .category-nav-link.active {
        border-left: 1px solid var(--primary);
        /* Reset border left */
        border: 1px solid var(--primary);
        background: var(--primary);
        color: white;
    }

    /* Sticky Sidebar (Cart) */
    .sticky-sidebar:not(.category-sidebar) {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100% !important;
        z-index: 9999 !important;
        background: white;
        border-top: 2px solid var(--primary);
        border-radius: 12px 12px 0 0;
        padding: 1rem;
        box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.2);
        max-height: 80vh;
        overflow-y: auto;
        display: flex;
        /* Initially hidden, JS toggles flex */
        flex-direction: column;

        /* Hidden by default or collapsed */
        transition: transform 0.3s;
    }

    /* We might need a toggle for the mobile cart if we want it sticky but hidden 
       OR simply let it stay at bottom of flow. For now, let's keep it static at bottom of page content 
       instead of sticky overlay to avoid complexity, or just normal stacking. */

    .sticky-sidebar:not(.category-sidebar) {
        position: static;
        transform: none;
        box-shadow: none;
        border-radius: 12px;
        margin-top: 2rem;
    }

    /* Adjust Hero */
    .hero-title {
        font-size: 1.8rem;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 cols on mobile usually better than 1 */
        gap: 0.5rem;
    }
}

/* Dashboard / Dealer Panel Styles */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-logo {
    margin-bottom: 2rem;
    display: block;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: #f1f5f9;
    color: var(--primary);
}

/* Responsive Sticky Sidebar (Transforms to component on mobile) */
.cart-mobile-icon {
    display: none;
    /* Hidden on desktop */
}

@media (max-width: 768px) {

    aside#mobile-sticky-category.show-sticky {
        bottom: 143px;
        animation: slideUpSticky 0.3s ease-out forwards;
    }

    /* Hide the default sticky sidebar container on mobile initially? NO, we want to repurpose it */
    .sticky-sidebar {
        padding: 0;
        margin: 0 !important;
        position: fixed !important;
        /* Force fixed */
        bottom: 70px;
        left: 0;
        top: unset;
        width: 100%;
        height: auto;
        z-index: 9999;
        display: flex;
        /* Always visible on mobile now */
        /* JS will toggle this if empty */


        /* Layout for Mobile Bar */
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    /* Force display flex when active on mobile */
    .sticky-sidebar:has(.cart-items-list) {
        display: flex;
    }

    /* However, 'display: none' in base CSS might override. 
       Let's ensure shop.php logic handles visibility or we use a class.
       Actually, sticky-sidebar is usually visible. 
       If empty, we might hide it.
    */

    /* Hide the Title "Sepet Özeti" on mobile */
    .sticky-sidebar h3 {
        display: none;
    }

    /* Hide the List of Items on mobile */
    .cart-items-list {
        display: none !important;
    }

    /* Show the Mobile Icon */
    .cart-mobile-icon {
        display: flex;
        position: relative;
        font-size: 1.5rem;
        color: var(--primary);
        margin-right: 15px;
    }

    .cart-mobile-icon .badge {
        position: absolute;
        top: -5px;
        right: -8px;
        background: #ef4444;
        color: white;
        font-size: 0.7rem;
        width: 18px;
        height: 18px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
    }

    /* Adjust Footer Summary layout for mobile row */
    #cart-content {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .cart-footer-summary {
        border-top: none !important;
        padding-top: 0 !important;
        display: flex;
        align-items: center;
        flex: 1;
        justify-content: space-between;
        margin-bottom: 0 !important;
    }

    /* Total Price Row */
    .cart-total-row {
        margin-bottom: 0 !important;
        flex-direction: column;
        line-height: 1.2;
        margin-right: 15px;
    }

    .cart-total-row span:first-child {
        font-size: 0.8rem;
        opacity: 0.8;
        font-weight: 400;
    }

    /* Checkout Button */
    .btn-checkout {
        width: auto !important;
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
}

.dashboard-main {
    flex: 1;
    padding: 2rem;
    background: #f8fafc;
    overflow-x: hidden;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    font-size: 0.85rem;
    font-weight: 500;
}

.bg-yellow-100 {
    background-color: #fef9c3;
}

.text-yellow-800 {
    color: #854d0e;
}

.bg-blue-100 {
    background-color: #dbeafe;
}

.text-blue-800 {
    color: #1e40af;
}

.bg-indigo-100 {
    background-color: #e0e7ff;
}

.text-indigo-800 {
    color: #3730a3;
}

.bg-green-100 {
    background-color: #dcfce7;
}

.text-green-800 {
    color: #166534;
}

.bg-red-100 {
    background-color: #fee2e2;
}

.text-red-800 {
    color: #991b1b;
}

.bg-gray-100 {
    background-color: #f3f4f6;
}


/* Dashboard Mobile */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-menu {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .sidebar-link {
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }

    .sidebar-link svg {
        display: none;
        /* Icon hidden on mobile top bar to save space? or keep it */
    }

    .dashboard-main {
        padding: 1rem;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }

    .stat-card {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
    }

    .stat-icon {
        margin-bottom: 0.5rem;
    }
}

/* Mobile Cart Styles */
.mobile-cart {
    display: none;
}

.desktop-only-rec {
    display: block;
}

@media (max-width: 768px) {

    .desktop-cart,
    .desktop-only-rec {
        display: none !important;
    }

    .mobile-cart {
        display: block;
        padding-bottom: 120px;
        /* Space for sticky footer */
    }

    /* Mobile Header */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 1rem;
        background: white;
        padding: 0.5rem 0;
    }

    .mobile-header h2 {
        font-size: 1.1rem;
        font-weight: 600;
        margin: 0;
        color: #1f2937;
    }

    .back-btn,
    .trash-btn {
        background: none;
        border: none;
        font-size: 1.2rem;
        color: #1f2937;
        cursor: pointer;
        padding: 0.5rem;
    }

    /* Dealer Card */
    .mobile-dealer-card {
        background: white;
        border-radius: 12px;
        padding: 1rem;
        display: flex;
        align-items: center;
        gap: 1rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        margin-bottom: 1.5rem;
        border: 1px solid #f1f5f9;
        position: relative;
    }

    .dealer-img {
        width: 60px;
        height: 60px;
        border-radius: 8px;
        object-fit: cover;
    }

    .dealer-details {
        flex: 1;
    }

    .dealer-details h3 {
        font-size: 1rem;
        margin: 0 0 0.25rem 0;
        font-weight: 600;
    }

    .dealer-meta {
        font-size: 0.8rem;
        color: #64748b;
        display: flex;
        gap: 0.5rem;
        align-items: center;
    }

    .dealer-meta .rating {
        background: #22c55e;
        color: white;
        padding: 2px 6px;
        border-radius: 4px;
        font-weight: 600;
        font-size: 0.75rem;
        display: flex;
        align-items: center;
        gap: 3px;
    }

    .dealer-arrow {
        color: #f97316;
        font-size: 1.2rem;
    }

    /* Product Cards */
    .mobile-product-card {
        background: white;
        padding: 1rem 0;
        border-bottom: 1px solid #f1f5f9;
        display: flex;
        gap: 1rem;
        align-items: flex-start;
    }

    .mobile-product-card:last-child {
        border-bottom: none;
    }

    .mobile-product-card img {
        width: 80px;
        height: 80px;
        border-radius: 8px;
        object-fit: cover;
    }

    .product-content {
        flex: 1;
    }

    .product-content h4 {
        margin: 0 0 0.5rem 0;
        font-size: 1rem;
        font-weight: 500;
        color: #1f2937;
    }

    .price-row {
        display: flex;
        gap: 0.5rem;
        align-items: center;
        font-size: 0.95rem;
    }

    .old-price {
        text-decoration: line-through;
        color: #94a3b8;
        font-size: 0.85rem;
    }

    .current-price {
        color: #f97316;
        font-weight: 600;
    }

    .qty-control {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        margin-left: auto;
        /* Push to right? Or below? Design shows inline */
        align-self: flex-end;
        /* Align bottom right */
    }

    .qty-form {
        margin: 0;
    }

    .qty-btn {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        border: 1px solid #f97316;
        background: white;
        color: #f97316;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 1rem;
    }

    .qty-val {
        font-weight: 600;
        min-width: 20px;
        text-align: center;
    }

    /* Recommendations Slider */
    .mobile-recommendations {
        margin-top: 2rem;
        background: #fff7ed;
        /* Light orange bg as per image hint */
        padding: 1rem;
        border-radius: 12px;
    }

    .rec-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
    }

    .rec-header h3 {
        margin: 0;
        font-size: 1rem;
        font-weight: 600;
        display: flex;
        align-items: center;
    }

    .rec-header .arrows {
        color: #94a3b8;
        font-size: 0.9rem;
    }

    .rec-slider {
        display: flex;
        gap: 1rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .rec-slider::-webkit-scrollbar {
        display: none;
    }

    .rec-card {
        min-width: 140px;
        width: 140px;
        background: white;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    }

    .rec-card img {
        width: 100%;
        height: 100px;
        object-fit: cover;
    }

    .rec-info {
        padding: 0.5rem;
        text-align: center;
    }

    .rec-info h5 {
        margin: 0 0 0.25rem 0;
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .rec-info .rec-price {
        font-size: 0.9rem;
        font-weight: 600;
        color: #1f2937;
        margin-bottom: 0.5rem;
    }

    .add-btn {
        width: 100%;
        background: #f1f5f9;
        border: none;
        padding: 0.4rem;
        border-radius: 4px;
        color: #f97316;
        cursor: pointer;
        font-size: 0.9rem;
        transition: all 0.2s;
    }

    .add-btn:hover {
        background: #e2e8f0;
    }

    /* Sticky Footer */
    .mobile-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: white;
        padding: 1rem;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        border-top-left-radius: 16px;
        border-top-right-radius: 16px;
    }

    .footer-summary-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
        font-size: 0.9rem;
        color: #64748b;
        font-weight: 600;
        cursor: pointer;
        /* Maybe toggle full summary */
    }

    .footer-total-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
        font-size: 1.1rem;
        font-weight: 700;
    }

    .footer-total-row .total-amount {
        color: #1f2937;
    }

    .confirm-btn {
        display: block;
        width: 100%;
        background: #f97316;
        color: white;
        text-align: center;
        padding: 1rem;
        border-radius: 99px;
        /* Pill shape */
        font-weight: 700;
        font-size: 1rem;
        text-decoration: none;
    }

    .confirm-btn:hover {
        background: #ea580c;
        color: white;
    }
}

/* Shop Mobile Redesign & Lightbox */

/* Lightbox Styles */
#lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s;
}

#lightbox-modal.active {
    display: flex;
    opacity: 1;
}

#lightbox-img {
    max-width: 95%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s;
}

#lightbox-modal.active #lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10001;
}

/* Mobile Product Card Overrides */
@media (max-width: 768px) {
    .products-grid {
        display: flex !important;
        flex-direction: column !important;
        /* Stack vertically */
        gap: 1rem !important;
    }

    .products-grid-shoppage {
        grid-template-columns: repeat(1, 1fr) !important;
    }

    .product-card {
        display: flex !important;
        flex-direction: row !important;
        /* Horizontal layout */
        align-items: flex-start !important;
        padding: 1rem !important;
        /* Larger padding like card */
        text-align: left !important;
        gap: 1rem;
    }

    .product-image {
        width: 110px !important;
        height: 110px !important;
        flex-shrink: 0;
        cursor: zoom-in;
        /* Indicate clickable */
    }

    .product-info {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        padding: 0 !important;
        /* Remove internal padding if any */
        height: 100%;
    }

    .product-title {
        font-size: 1rem !important;
        margin-bottom: 0.25rem !important;
        line-height: 1.2;
    }

    .product-desc {
        font-size: 0.8rem;
        color: #64748b;
        margin-bottom: 0.5rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        /* Limit to 2 lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        line-height: 1.3;
    }

    .product-rating-line {
        display: flex;
        /* Show on mobile */
        align-items: center;
        gap: 0.5rem;
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
    }

    .product-bottom-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: auto;
    }

    .product-price {
        font-size: 1.1rem !important;
        font-weight: 700;
        color: #f97316 !important;
        /* Orange price */
    }

    .btn-outline-orange {
        background: white;
        border: 1px solid #f97316;
        color: #f97316;
        padding: 0.4rem 1rem;
        border-radius: 99px;
        font-weight: 600;
        font-size: 0.9rem;
        transition: all 0.2s;
    }

    .btn-outline-orange:hover {
        background: #f97316;
        color: white;
    }

    /* Hide desktop controls if any inside card default */
    .product-card form button.btn {
        /* We replaced the button class in PHP, but if old styles remain */
    }
}

/* Hide rating/desc on desktop if desired, or style them too. 
   For now, ensure they look okay on desktop if they appear (vertical card).
*/
@media (min-width: 769px) {
    .product-rating-line {
        display: none;
        /* Hide rating on desktop for now to keep it clean, or style it */
    }

    .product-desc {
        display: none;
        /* Keep desktop simple or show? Let's hide to match potential desktop design */
    }

    /* Ensure btn-outline-orange works on desktop card if PHP uses it there too */
    .btn-outline-orange {
        width: 100%;
        background: var(--primary);
        color: white;
        border: none;
        padding: 0.5rem;
        border-radius: 6px;
    }

    .btn-outline-orange:hover {
        opacity: 0.9;
    }
}

/* Global Compact Shop Header */
.shop-header-compact {
    display: block;
    margin-top: 1rem;
    margin-bottom: 1rem;
    /* Reduced margin */
}

.shop-info-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 0.75rem;
    /* Reduced padding */
    display: flex;
    gap: 0.75rem;
    align-items: center;
    border: 1px solid #f1f5f9;
}

.shop-img-wrapper {
    width: 60px;
    /* Smaller */
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.shop-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-details {
    flex: 1;
    overflow: hidden;
}

.shop-details .shop-name {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.2rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #1f2937;
}

.shop-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
    flex-wrap: wrap;
}

.status-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.7rem;
}

.status-badge.open {
    background: #dcfce7;
    color: #166534;
}

.status-badge.closed {
    background: #fee2e2;
    color: #991b1b;
}

.meta-item {
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 3px;
}

.shop-address-snippet {
    font-size: 0.7rem;
    color: #94a3b8;
}

.info-btn {
    background: none;
    border: none;
    color: #f97316;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Global Horizontal Product Cards */
.products-grid {
    display: flex;
    flex-direction: column;
    /* Always stack */
    gap: 0.75rem;
    /* Reduced gap */
}

.product-card {
    display: flex;
    flex-direction: row;
    /* Always horizontal */
    align-items: flex-start;
    padding: 0.75rem;
    /* Compact padding */
    text-align: left;
    gap: 0.75rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-sm);
    scroll-margin-top: 140px;
    /* Offset for sticky header deep linking */
    transition: background-color 0.3s;
}

.product-card:target {
    background-color: #fff7ed;
    /* Light orange highlight when targeted */
    border-color: #f97316;
}

.product-image {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    cursor: zoom-in;
    border-radius: 8px;
    object-fit: cover;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    min-height: 100px;
    /* Match image height */
}

.product-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.2;
    color: #1f2937;
}

.product-desc {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.4rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Standard property */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* Ensure description shows on all devices now */
@media (min-width: 769px) {
    .product-desc {
        display: -webkit-box !important;
    }
}

.product-rating-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.product-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #f97316;
}

.btn-outline-orange {
    background: white;
    border: 1px solid #f97316;
    color: #f97316;
    padding: 0.3rem 0.8rem;
    /* Compact button */
    border-radius: 99px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-outline-orange:hover {
    background: #f97316;
    color: white;
}

/* Lightbox Styles (Global) */
#lightbox-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s;
}

#lightbox-modal.active {
    display: flex;
    opacity: 1;
}

#lightbox-img {
    max-width: 95%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s;
}

#lightbox-modal.active #lightbox-img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10001;
}

/* Global Cart Styles */
.cart-wrapper {
    display: block;
    padding-bottom: 120px;
    /* Space for sticky footer */
    position: relative;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    background: white;
    padding: 0.5rem 0;
}

.cart-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: #1f2937;
}

.back-btn,
.trash-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #1f2937;
    cursor: pointer;
    padding: 0.5rem;
}

/* Dealer Card */
.cart-dealer-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    border: 1px solid #f1f5f9;
    position: relative;
}

.dealer-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.dealer-details {
    flex: 1;
}

.dealer-details h3 {
    font-size: 1rem;
    margin: 0 0 0.25rem 0;
    font-weight: 600;
}

.dealer-meta {
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.dealer-meta .rating {
    background: #22c55e;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 3px;
}

.dealer-arrow {
    color: #f97316;
    font-size: 1.2rem;
}

/* Product Cards */
.cart-product-card {
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.cart-product-card:last-child {
    border-bottom: none;
}

.cart-product-card img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.product-content {
    flex: 1;
}

.product-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    color: #1f2937;
}

.price-row {
    font-size: 0.9rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.old-price {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 0.8rem;
}

.current-price {
    color: #f97316;
    font-weight: 600;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    align-self: flex-end;
}

.qty-form {
    margin: 0;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #f97316;
    background: white;
    color: #f97316;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
}

.qty-btn:hover {
    background: #f97316;
    color: white;
}

.qty-val {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

/* Recommendations Slider */
.cart-recommendations {
    margin-top: 2rem;
    background: #fff7ed;
    padding: 1rem;
    border-radius: 12px;
}

.rec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.rec-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.rec-header .arrows {
    color: #94a3b8;
    font-size: 0.9rem;
}

.rec-slider {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.rec-slider::-webkit-scrollbar {
    display: none;
}

.rec-card {
    min-width: 140px;
    width: 140px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.rec-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.rec-info {
    padding: 0.5rem;
    text-align: center;
}

.rec-info h5 {
    margin: 0 0 0.25rem 0;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rec-info .rec-price {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.add-btn {
    width: 100%;
    background: #f1f5f9;
    border: none;
    padding: 0.4rem;
    border-radius: 4px;
    color: #f97316;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.add-btn:hover {
    background: #e2e8f0;
}

/* Sticky Footer */
.cart-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    padding: 1rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

/* Center footer on large screens if desired, or keep full width */
@media (min-width: 769px) {
    .cart-sticky-footer {
        max-width: 800px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 16px 16px 0 0;
    }
}

.footer-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
}

.footer-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.footer-total-row .total-amount {
    color: #1f2937;
}

.confirm-btn {
    display: block;
    width: 100%;
    background: #f97316;
    color: white;
    text-align: center;
    padding: 1rem;
    border-radius: 99px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
}

.confirm-btn:hover {
    background: #ea580c;
    color: white;
}

/* Checkout Redesign Styles */
.checkout-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #f1f5f9;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1f2937;
    margin-top: 2rem;
}

.section-title:first-child {
    margin-top: 0;
}

/* Payment Options */
.payment-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-option.selected {
    border-color: #f97316;
    background: #fff7ed;
}

.payment-option:last-child {
    margin-bottom: 0;
}

.radio-circle {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.radio-circle.selected {
    border-color: #f97316;
}

.radio-circle.selected::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #f97316;
    border-radius: 50%;
}

/* Location Modal Redesign */
.modal-new-address-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: #f97316;
    color: white;
    font-weight: 600;
    padding: 0.75rem;
    border-radius: 99px;
    margin-bottom: 1.5rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.modal-new-address-btn:hover {
    background: #ea580c;
    color: white;
}

.saved-addr-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 0.5rem;
    /* Space for scrollbar */
}

/* Scrollbar Styling */
.saved-addr-list::-webkit-scrollbar {
    width: 6px;
}

.saved-addr-list::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.saved-addr-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.saved-addr-radio-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border: 1px solid transparent;
    border-radius: 12px;
    transition: all 0.2s;
    background: white;
}

.saved-addr-radio-item:hover {
    background: #f8fafc;
    border-color: #eee;
}

.saved-addr-radio-circle {
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    margin-top: 2px;
}

.saved-addr-radio-item.selected .saved-addr-radio-circle {
    border-color: #f97316;
}

.saved-addr-radio-item.selected .saved-addr-radio-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #f97316;
    border-radius: 50%;
}

.saved-addr-radio-item.selected {
    border-color: #fdba74;
    background: #fff7ed;
    /* Light orange tint */
}



.saved-addr-content {
    flex: 1;
}

.saved-addr-title {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.2rem;
    font-size: 1rem;
}

.saved-addr-text {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

/* Profile Page Layout */
.profile-layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

@media (max-width: 768px) {
    .profile-layout-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.saved-addr-phone {
    font-size: 0.85rem;
    color: #1f2937;
    font-weight: 600;
    font-family: monospace;
}

.products-grid.homepage-products {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

/* Dealer Layout Grid */
.dealer-layout-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

@media (max-width: 768px) {
    .dealer-layout-grid {
        grid-template-columns: 1fr;
        /* Stack vertically */
    }

    /* Optional: Ensure product grid adjusts too */
    .products-grid {
        grid-template-columns: 1fr 1fr !important;
        /* Force 2 columns on mobile */
        gap: 0.5rem;
        /* Reduce gap slightly for mobile */
    }
}

/* --- Custom Calendar Modal Styles --- */
.calendar-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.calendar-modal-overlay.active {
    opacity: 1;
}

.calendar-modal {
    background: white;
    width: 90%;
    max-width: 400px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.calendar-modal-overlay.active .calendar-modal {
    transform: translateY(0);
}

.cal-header {
    background: #f8fafc;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.cal-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #1f2937;
}

.cal-nav-btn {
    background: white;
    border: 1px solid #e2e8f0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
}

.cal-nav-btn:hover {
    background: #f1f5f9;
    color: #f97316;
    border-color: #fdba74;
}

.cal-body {
    padding: 15px;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
}

.cal-day-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    padding-bottom: 10px;
}

.cal-date-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    color: #334155;
    transition: all 0.2s;
}

.cal-date-cell:hover:not(.disabled):not(.empty) {
    background: #fff7ed;
    color: #f97316;
}

.cal-date-cell.selected {
    background: #f97316 !important;
    color: white !important;
    box-shadow: 0 4px 6px rgba(249, 115, 22, 0.3);
}

.cal-date-cell.today {
    border: 1px solid #f97316;
    color: #f97316;
}

.cal-date-cell.disabled {
    opacity: 0.3;
    background: #f1f5f9;
    color: #cbd5e1;
    cursor: not-allowed;
    pointer-events: none;
}

.cal-date-cell.empty {
    cursor: default;
}

.cal-footer {
    padding: 15px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.cal-close-btn {
    background: transparent;
    border: none;
    color: #64748b;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
}

.cal-close-btn:hover {
    background: #f1f5f9;
    color: #1f2937;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 2rem;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 1rem;
    font-weight: 600;
    color: #4b5563;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}

.auth-tab:hover {
    color: var(--primary);
}

.auth-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.homepage-products .product-card {
    display: flex;
    align-items: center;
}

.homepage-products .product-card>div:nth-child(3) {
    margin-left: auto;
}

/* iOS Install Modal */
.ios-install-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: none;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ios-install-modal.active {
    display: flex;
    opacity: 1;
}

.ios-install-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 20px 20px 0 0;
    padding: 2rem 1.5rem;
    position: relative;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
}

.ios-install-modal.active .ios-install-content {
    transform: translateY(0);
}

.ios-install-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.ios-install-close:hover {
    background: #e2e8f0;
    color: #ef4444;
}

.ios-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ios-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ios-install-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.ios-install-content>p {
    color: var(--secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.ios-steps {
    text-align: left;
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem;
    border: 1px solid var(--border);
}

.ios-steps .step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.ios-steps .step:last-child {
    border-bottom: none;
}

.ios-steps .step-num {
    background: var(--primary);
    /* Using requested orange */
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.ios-steps p {
    font-size: 0.9rem;
    color: var(--text-main);
    margin: 0;
    line-height: 1.4;
}

.ios-steps i {
    color: #007aff;
    /* Apple Blue for system icons */
    font-size: 1.1em;
    vertical-align: middle;
    margin: 0 2px;
}

/* Hide App Download Section in PWA Standalone Mode */
@media all and (display-mode: standalone) {
    .footer-top-inner {
        display: none !important;
    }
}

/* WhatsApp Button */
.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #128C7E;
}

/* Shop Contact Buttons */
.shop-contact-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.btn-contact {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    text-decoration: none;
    transition: transform 0.2s;
    max-width: 250px;
}

.btn-contact:hover {
    transform: scale(1.02);
}

.btn-call {
    background-color: #1a73e8;
    /* Blue */
}

.btn-whatsapp-shop {
    background: linear-gradient(90deg, #25D366 0%, #128C7E 100%);
    /* Green Gradient */
}

@media (max-width: 600px) {
    .shop-contact-buttons {
        /* Mobile Sticky Bottom Bar Option - or just inline */
        /* For now inline as per request 'appropriate place' */
        /* But to ensure 'side by side' on small screens: */
        flex-direction: row;
    }

    .btn-contact {
        font-size: 0.9rem;
        padding: 10px 15px;
        white-space: nowrap;
    }
}

.sticky-sidebar .shop-contact-buttons {
    width: -webkit-fill-available;
    margin-top: 6px;
}

/* Mobile Sticky Contact Buttons Logic */
/* Hide on desktop (using ID for specificity) */
@media (min-width: 769px) {
    #mobile-sticky-buttons {
        display: none !important;
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    #mobile-sticky-buttons {
        display: none;
        /* Hidden by default until scrolled */
    }

    #mobile-sticky-buttons.show-sticky {
        display: flex !important;
        width: 100%;
        padding: 15px;
        z-index: 10002;
        /* High z-index to stay on top */
        animation: slideUpSticky 0.3s ease-out forwards;
        justify-content: center;
        gap: 10px;
    }

    /* Adjust button size for sticky bar */
    #mobile-sticky-buttons.show-sticky .btn-contact {
        flex: 1;
        margin: 0;
        max-width: none;
        padding: 12px;
        border-radius: 12px;
    }

    #checkoutForm>div:nth-child(1) {
        display: block !important;
    }
}

@keyframes slideUpSticky {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}