/* style.css - Component and Layout Styles matching abstore.shop (Martfury) */

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
}

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-xs { gap: 5px; }
.gap-sm { gap: 10px; }
.gap-md { gap: 20px; }
.gap-lg { gap: 30px; }
.gap-xl { gap: 40px; }
.gap-2xl { gap: 60px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.position-relative { position: relative; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: var(--font-size-base);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-heading);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-light);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--text-heading);
}

/* ==========================================================================
   Header (Martfury Style)
   ========================================================================== */
.mf-header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Topbar */
.mf-topbar {
    background-color: var(--bg-topbar);
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
    padding: 8px 0;
    color: var(--text-secondary);
}

.mf-topbar p { margin: 0; }
.mf-topbar a { color: var(--text-secondary); }
.mf-topbar a:hover { color: var(--primary-color); }
.topbar-divider { width: 1px; height: 12px; background-color: #ddd; }

/* Main Header */
.mf-header-main {
    padding: 10px 0;
}

.header-main-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.header-main-grid .mf-search {
    order: 3;
    width: 100%;
    margin: 0;
}

.mf-logo h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    color: var(--text-heading);
    line-height: 1;
}

.mf-search {
    flex: 1 1 100%;
    max-width: 100%;
    margin: 10px 0;
    order: 3;
    border: 1px solid var(--border-color);
    border-radius: 0;
    height: 48px;
    background: var(--bg-surface);
    display: flex;
    align-items: center;
    transition: border-color 0.3s ease;
}

.mf-search:focus-within {
    border-color: var(--primary-color);
}

.mf-search-select {
    border: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 15px center;
    padding: 0 40px 0 20px;
    height: 100%;
    outline: none;
    border-right: 1px solid var(--border-color);
    color: var(--text-heading);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 0;
}

.mf-search input {
    flex: 1;
    border: none;
    padding: 0 20px;
    height: 100%;
    outline: none;
    font-size: 15px;
    background: transparent;
    color: var(--text-heading);
}

.mf-search input::placeholder {
    color: var(--text-muted);
}

.mf-search-btn {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 0 35px;
    height: 100%;
    margin-right: 0;
    border-radius: 0;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.mf-search-btn:hover {
    background: var(--text-heading);
}

/* AJAX Search Dropdown */
.ajax-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-top: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 1050;
    max-height: 400px;
    overflow-y: auto;
}

.ajax-search-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: var(--text-heading);
    transition: background-color 0.2s ease;
}

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

.ajax-search-item:hover {
    background-color: #f9f9f9;
}

.ajax-search-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-right: 15px;
    flex-shrink: 0;
}

.ajax-search-title {
    font-size: 14px;
    font-weight: 500;
    flex-grow: 1;
}

.ajax-search-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    flex-shrink: 0;
}

.ajax-search-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

.mf-actions .action-item a {
    color: var(--text-heading);
    font-size: 13px;
    font-weight: 400;
}
.mf-actions .action-item a:hover {
    color: var(--primary-color);
}
.mf-actions .action-item span:not(.badge) {
    display: none;
}

.badge {
    position: absolute;
    top: -5px;
    left: 15px;
    background-color: var(--primary-color);
    color: var(--text-heading);
    font-size: 11px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Navigation */
.mf-navigation {
    border-top: 1px solid var(--border-color);
}

.mf-department-menu {
    position: relative;
    width: 270px;
}

.dept-title {
    background-color: var(--text-heading);
    color: var(--text-light);
    padding: 8px 15px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}

.mf-main-nav a {
    color: var(--text-heading);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 0;
    position: relative;
}

.mf-main-nav a:hover {
    color: var(--primary-color);
}

/* Category Ribbon (Below Nav) */
.category-ribbon-container {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    padding: 15px 0 10px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.category-ribbon {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 5px;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.category-ribbon::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.category-ribbon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 65px;
    text-align: center;
    gap: 8px;
}

.cat-image-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--bg-topbar);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.cat-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-ribbon-item:hover .cat-image-wrapper {
    transform: translateY(-2px);
}

.cat-name {
    font-size: 11px;
    color: var(--info-color); /* Usually blue as in screenshot */
    font-weight: 500;
    white-space: nowrap;
    text-transform: capitalize;
}

.category-ribbon-item:hover .cat-name {
    color: var(--primary-color);
}

/* ==========================================================================
   Hero & Homepage specific (Martfury)
   ========================================================================== */
.mf-hero-section {
    padding-top: 30px;
    margin-bottom: 60px;
}

.mf-hero-grid {
    display: flex;
    gap: 30px;
}

.mf-hero-slider {
    flex: 1;
    background-color: #eee;
    height: 400px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mf-hero-banners {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.mf-banner {
    background-color: #ddd;
    height: 185px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mf-section-title {
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mf-section-links a {
    font-size: 14px;
    color: var(--text-secondary);
    margin-left: 20px;
}

.mf-section-links a:hover, .mf-section-links a.active {
    color: var(--primary-color);
}

/* Product Cards */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px; /* Separated grids */
}

.product-card {
    background: var(--bg-surface);
    padding: 12px;
    border: 1px solid var(--border-color); /* Full independent border */
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-body);
    z-index: 2;
}

.product-image {
    width: 100%;
    height: 140px;
    object-fit: contain;
    margin-bottom: 15px;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image {
    transform: scale(1.06);
}

.product-brand {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.product-name {
    font-size: 14px;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.product-rating {
    margin-bottom: 10px;
    color: #ffb503; /* Star color */
    font-size: 12px;
}

.product-price-row {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-heading);
}

.price-original {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 10px;
    font-weight: 400;
}

.product-card .add-to-cart-btn {
    opacity: 0;
    position: absolute;
    bottom: 12px;
    left: 12px;
    right: 12px;
    background: var(--primary-color);
    color: var(--text-light); /* White text for better contrast on flat design */
    text-align: center;
    padding: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* Slight shadow to lift it off the content */
}

.product-card:hover .add-to-cart-btn {
    opacity: 1;
    transform: translateY(0);
}

.product-card .add-to-cart-btn:hover {
    background: var(--secondary-color);
}

/* ==========================================================================
   Footer (Martfury)
   ========================================================================== */
.mf-footer {
    margin-top: 60px;
}

.mf-newsletter {
    background-color: var(--bg-topbar);
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.newsletter-right input {
    width: 350px;
    padding: 0 20px;
    border: 1px solid var(--border-color);
    height: 46px;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    outline: none;
}

.newsletter-right button {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    height: 46px;
}

.mf-footer-widgets {
    padding: 60px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
}

.widget h4 {
    font-size: 16px;
    margin-bottom: 20px;
}

.widget p {
    font-size: 14px;
    margin-bottom: 10px;
}

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

.widget ul li a {
    color: var(--text-secondary);
    font-size: 14px;
}

.widget ul li a:hover {
    color: var(--primary-color);
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    background: #eee;
    border-radius: 50%;
    color: var(--text-heading);
}

.social-icons a:hover {
    background: var(--primary-color);
    color: #fff;
}

.mf-footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 20px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

/* ==========================================================================
   Auth Modal
   ========================================================================== */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.auth-modal-content {
    background: var(--bg-surface);
    width: 100%;
    max-width: 450px;
    padding: 40px;
    border: 1px solid var(--border-color);
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.auth-modal-overlay.show .auth-modal-content {
    transform: translateY(0);
}

.auth-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}

.auth-modal-close:hover {
    color: var(--danger-color);
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.auth-tab {
    flex: 1;
    background: transparent;
    border: none;
    padding: 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.auth-tab.active {
    color: var(--text-heading);
    border-bottom-color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group .required {
    color: var(--danger-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    background: var(--bg-body);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--primary-color);
}

/* Homepage Grids & Layouts */
.features-bar {
    display: flex;
    justify-content: space-between;
}

.category-grid {
    display: grid; 
    grid-template-columns: repeat(6, 1fr); 
    gap: 20px;
}

.banner-grid {
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 30px;
}

/* Hero Desktop Styles */
.mf-hero-slider {
    min-height: 500px;
}

.hero-content-wrapper {
    height: 100%;
    min-height: 500px;
}

.hero-title {
    font-size: 56px;
    margin-bottom: 30px;
    color: var(--text-heading);
    max-width: 500px;
    line-height: 1.1;
}

/* ==========================================================================
   Mobile-First Responsive Design
   Base styles above are for mobile. We scale UP with min-width.
   ========================================================================== */

/* --- MOBILE BASE OVERRIDES (up to 767px, the default) --- */

/* Container */
.container {
    padding: 0 15px;
}

/* Header */
.mobile-menu-toggle {
    display: block;
    margin-right: 15px;
    color: var(--text-heading);
}

.mf-header-main .container {
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 12px;
}

.mf-logo {
    flex: 1 1 auto;
}

.mf-logo h1 {
    font-size: 20px;
}

.mf-search {
    order: 3;
    flex: 0 0 100%;
    max-width: 100%;
    margin: 12px 0 0 0;
    height: 40px;
}

.mf-search-select {
    display: none;
}

.mf-actions {
    flex: 0 0 auto;
}

.mf-actions .action-item span:not(.badge) {
    display: none;
}

/* Navigation hidden on mobile */
.mf-navigation {
    display: none;
}

/* Category Ribbon */
.category-ribbon-container {
    padding: 10px 0;
}

.category-ribbon {
    gap: 10px;
}

.cat-image-wrapper {
    width: 50px;
    height: 50px;
}

/* Hero */
.mf-hero-slider {
    min-height: 280px;
}

.hero-content-wrapper {
    min-height: 280px;
    padding: 25px 15px;
}

.hero-title {
    font-size: 28px;
    max-width: 100%;
    line-height: 1.15;
    margin-bottom: 20px;
}

/* Section Titles */
.mf-section-title {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    font-size: 20px;
}

/* Product Grids */
.product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-card {
    padding: 10px;
}

.product-image {
    height: 120px;
}

.product-card .add-to-cart-btn {
    opacity: 1;
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    transform: none;
    margin-top: 10px;
    font-size: 13px;
    padding: 8px;
}

/* Homepage Grids */
.category-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.banner-grid {
    grid-template-columns: 1fr;
    gap: 15px;
}

.features-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* Section Links */
.mf-section-links {
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
    padding-bottom: 5px;
}

.mf-section-links a {
    margin-left: 0;
    margin-right: 15px;
}

/* Footer */
.footer-grid {
    grid-template-columns: 1fr;
    gap: 25px;
}

.mf-newsletter .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

.newsletter-right {
    width: 100%;
}

.newsletter-right input {
    width: 100%;
}

.mf-footer-bottom .container {
    flex-direction: column;
    text-align: center;
    gap: 10px;
}

/* Auth Modal */
.auth-modal-content {
    padding: 20px;
    margin: 15px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Product Detail */
.product-details-layout {
    flex-direction: column;
    padding: 15px;
    gap: 25px;
}

.product-image-col,
.product-info-col {
    width: 100%;
}

/* Cart & Checkout */
.cart-layout {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.cart-sidebar {
    width: 100%;
    flex-shrink: 0;
}

/* Product Details */
.product-details-layout {
    display: flex;
    flex-direction: column;
    padding: 15px;
    gap: 25px;
}

.product-image-col {
    width: 100%;
    flex-shrink: 0;
}

/* Product Cards & Grids */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0;
    border-top: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
}

.categories-page-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
}

.reviews-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.reviews-sidebar {
    width: 100%;
}

.product-card {
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 0;
    transition: 0.3s;
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-image {
    width: 100%;
    height: 180px;
    object-fit: contain;
    border-radius: 0;
    margin-bottom: 15px;
}

.product-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-heading);
    margin-bottom: 10px;
    text-decoration: none;
    position: static;
}

/* Stretched link to make entire card clickable */
.product-name::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
}

/* Ensure buttons and interactive elements stay above stretched link */
.product-card .add-to-cart-btn,
.product-card button,
.product-card .badge {
    position: relative;
    z-index: 2;
}

.product-card-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* --- NEW PAGES: Mobile Base --- */

/* Contact Page */
.contact-grid {
    grid-template-columns: 1fr;
}

/* Account Pages: Sidebar + Content */
.account-layout {
    grid-template-columns: 1fr;
    gap: 25px;
}

.account-sidebar {
    order: -1;
}

/* Order Details */
.order-addresses-grid {
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Address Book */
.address-cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
}

/* Settings Form - name fields */
.settings-name-grid {
    grid-template-columns: 1fr;
    gap: 15px;
}

/* Search Toolbar */
.shop-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

/* Wishlist table: stack on mobile */
.wishlist-table thead {
    display: none;
}

.wishlist-table tr {
    display: flex;
    flex-wrap: wrap;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    gap: 10px;
    align-items: center;
}

.wishlist-table td {
    padding: 5px 0;
}

.wishlist-table .wl-remove-col {
    order: 5;
}

.wishlist-table .wl-product-col {
    flex: 1 1 100%;
}

.wishlist-table .wl-price-col,
.wishlist-table .wl-stock-col {
    flex: 1;
}

.wishlist-table .wl-action-col {
    flex: 0 0 100%;
}

/* Categories page: smaller cards */
.categories-page-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

/* Checkout Success */
.checkout-success-box {
    padding: 30px 20px;
}

/* FAQ items */
.faq-list {
    gap: 15px;
}

/* Base Grids (Mobile First) */
.banner-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 15px;
}
.footer-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}
.category-ribbon {
    display: flex;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 15px;
}
.category-ribbon::-webkit-scrollbar {
    display: none;
}

.mf-hero-slider {
    min-height: 300px;
}
.hero-content-wrapper {
    min-height: 300px;
    padding: 30px 15px;
}

/* Mobile Bottom Nav */
body {
    padding-bottom: 60px; /* Space for the bottom nav */
}
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
}

/* Mobile visibility utilities */
.hide-on-mobile {
    display: none !important;
}

.mobile-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.mobile-bottom-nav a:hover,
.mobile-bottom-nav a.active {
    color: var(--primary-color);
}


/* ==========================================================================
   TABLET BREAKPOINT (min-width: 768px)
   ========================================================================== */
@media (min-width: 768px) {
    /* Hide bottom nav on tablet/desktop */
    .mobile-bottom-nav {
        display: none !important;
    }
    body {
        padding-bottom: 0;
    }

    .hide-on-mobile {
        display: block !important;
    }

    .container {
        padding: 0 20px;
    }

    /* Header */
    .mobile-menu-toggle {
        display: none !important;
    }

    .mf-logo h1 {
        font-size: 22px;
    }

    .mf-search {
        order: 0;
        flex: 1;
        max-width: 400px;
        margin: 0 20px;
    }

    .mf-header-main .container {
        flex-wrap: nowrap;
    }

    .mf-actions .action-item span:not(.badge) {
        display: inline;
    }

    /* Hero */
    .mf-hero-slider {
        min-height: 400px;
    }

    .hero-content-wrapper {
        min-height: 400px;
        padding: 40px 30px;
    }

    .banner-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .footer-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .hero-title {
        font-size: 40px;
        max-width: 450px;
    }

    /* Section Title */
    .mf-section-title {
        flex-direction: row;
        align-items: center;
        font-size: 24px;
    }

    /* Product Grids */
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .product-image {
        height: 140px;
    }

    .product-card .add-to-cart-btn {
        opacity: 0;
        position: absolute;
        bottom: 12px;
        left: 12px;
        right: 12px;
        transform: translateY(15px);
        margin-top: 0;
    }

    .product-card:hover .add-to-cart-btn {
        opacity: 1;
        transform: translateY(0);
    }

    /* Category Grid */
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    /* Banner Grid */
    .banner-grid {
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .mf-newsletter .container {
        flex-direction: row;
        align-items: center;
    }

    .newsletter-right input {
        width: 300px;
    }

    .mf-footer-bottom .container {
        flex-direction: row;
        text-align: left;
    }

    /* Contact Grid */
    .contact-grid {
        grid-template-columns: 1fr 2fr;
        gap: 30px;
    }

    /* Account Layout */
    .account-layout {
        grid-template-columns: 250px 1fr;
        gap: 30px;
    }

    /* Cart & Checkout */
    .cart-layout {
        flex-direction: row;
        gap: 30px;
    }

    .cart-sidebar {
        width: 350px;
    }

    /* Product Details */
    .product-details-layout {
        flex-direction: row;
        padding: 40px;
        gap: 40px;
    }

    .product-image-col {
        width: 45%;
    }

    /* Product Cards & Grids */
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
    }

    .categories-page-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .reviews-layout {
        flex-direction: row;
        gap: 50px;
    }

    .reviews-sidebar {
        width: 35%;
        flex-shrink: 0;
    }

    .product-card {
        padding: 15px;
    }

    .product-image {
        height: 220px;
    }

    /* Order Addresses */
    .order-addresses-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    /* Address Cards */
    .address-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    /* Settings Form */
    .settings-name-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    /* Shop Toolbar */
    .shop-toolbar {
        flex-direction: row;
        align-items: center;
    }

    /* Wishlist: restore table layout */
    .wishlist-table thead {
        display: table-header-group;
    }

    .wishlist-table tr {
        display: table-row;
    }

    .wishlist-table td {
        display: table-cell;
        padding: 15px 20px;
    }

    /* Categories page grid */
    .categories-page-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 30px;
    }

    /* Checkout success */
    .checkout-success-box {
        padding: 60px 40px;
    }

    /* Auth modal */
    .auth-modal-content {
        padding: 40px;
        margin: 0;
    }
}

/* ==========================================================================
   DESKTOP BREAKPOINT (min-width: 1024px)
   ========================================================================== */
@media (min-width: 1024px) {
    .container {
        padding: 0 40px;
    }

    /* Header */
    .header-main-grid {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        gap: 20px;
        flex-wrap: nowrap;
    }

    .header-main-grid .mf-logo {
        justify-self: start;
    }

    .header-main-grid .mf-search {
        justify-self: center;
        width: 100%;
        min-width: 600px;
        max-width: 800px;
        order: initial;
        margin: 0;
    }

    .header-main-grid .mf-actions {
        justify-self: end;
    }

    .mf-logo h1 {
        font-size: 24px;
    }

    .mf-search-select {
        display: block;
    }

    /* Navigation visible */
    .mf-navigation {
        display: block;
    }

    /* Hero */
    .mf-hero-slider {
        min-height: 500px;
    }

    .hero-content-wrapper {
        min-height: 500px;
    }

    .hero-title {
        font-size: 56px;
        max-width: 500px;
    }

    /* Product Grids */
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    /* Category Grid */
    .category-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }

    .newsletter-right input {
        width: 350px;
    }

    /* Features */
    .features-bar {
        display: flex;
        justify-content: space-between;
    }

    /* Category Ribbon */
    .cat-image-wrapper {
        width: 60px;
        height: 60px;
    }

    .category-ribbon {
        gap: 15px;
    }
}

/* ==========================================================================
   Sidebar Cart
   ========================================================================== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

.sidebar-cart {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    max-width: 100vw;
    height: 100vh;
    background: var(--bg-surface);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1), left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
}

.sidebar-cart.open {
    right: 0;
}

.sidebar-left {
    right: auto;
    left: -400px;
    box-shadow: 5px 0 25px rgba(0,0,0,0.1);
}

.sidebar-left.open {
    left: 0;
    right: auto;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-list li {
    border-bottom: 1px solid var(--border-light);
}

.mobile-nav-list li a {
    display: block;
    padding: 15px 20px;
    color: var(--text-heading);
    font-size: 15px;
    font-weight: 500;
}

.mobile-nav-list li a:hover {
    background-color: var(--bg-body);
    color: var(--primary-color);
}

.sidebar-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-cart-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.sidebar-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-close-btn:hover {
    color: var(--danger-color);
}

.sidebar-cart-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
}

.sidebar-cart-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.sidebar-cart-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 0;
    border: 1px solid var(--border-light);
}

.sidebar-item-details {
    flex-grow: 1;
}

.sidebar-item-title {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-heading);
    text-decoration: none;
    margin-bottom: 5px;
}

.sidebar-item-title:hover {
    color: var(--primary-color);
}

.sidebar-item-price {
    font-size: 14px;
    color: var(--text-muted);
}

.sidebar-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
}

.sidebar-item-remove:hover {
    color: var(--danger-color);
}

.sidebar-cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: #fcfcfc;
}

.sidebar-cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-heading);
}

.sidebar-cart-actions .btn {
    padding: 12px;
    font-weight: 600;
    border-radius: 0;
}

