/* ============================
   RESET & BASE
   ============================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: #f0f5f1;
    color: #1a2e24;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ============================
   TOP BAR — Social / Contact
   ============================ */
.top-bar {
    background: #0d2818;
    color: #adb5bd;
    font-size: 13px;
    padding: 6px 20px;
}
.top-bar-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 20px;
}
.top-bar-links {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.top-bar-links a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #c8d6ce;
    transition: color 0.2s;
    white-space: nowrap;
}
.top-bar-links a:hover { color: #95d5b2; }
.top-bar-links .icon { font-size: 16px; }
.top-bar-links .divider {
    color: #2d4a3a;
    font-size: 14px;
}

/* ============================
   MAIN NAVIGATION
   ============================ */
.main-nav {
    background: #1b4332;
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    z-index: 999;
}
.main-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    padding: 0 20px;
}
.nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
    flex: 1;
}
.nav-menu li a {
    display: block;
    padding: 10px 16px;
    color: #d8e6de;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}
.nav-menu li a:hover,
.nav-menu li a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-actions a,
.nav-actions button {
    color: #d8e6de;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: background 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 5px;
}
.nav-actions a:hover,
.nav-actions button:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}
.nav-actions .label {
    font-size: 13px;
    font-weight: 500;
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #d8e6de;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}

/* ============================
   HEADER (Logo + Actions)
   ============================ */
.header {
    background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 50%, #40916c 100%);
    color: #fff;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 16px;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.logo img { height: 50px; width: auto; }
.logo img + img { height: 38px; width: auto; }

.header-tagline {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    letter-spacing: 0.3px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}
.header-actions .grid-controls {
    display: flex;
    gap: 4px;
}
.header-actions .grid-btn {
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.15);
    color: #d8e6de;
    padding: 7px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    font-family: inherit;
    line-height: 1;
}
.header-actions .grid-btn:hover {
    background: rgba(255,255,255,0.22);
    color: #fff;
}
.header-actions .grid-btn.active {
    background: rgba(255,255,255,0.25);
    color: #fff;
    border-color: rgba(255,255,255,0.3);
}
.cart-btn {
    position: relative;
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}
.cart-btn:hover { background: rgba(255,255,255,0.22); }
.cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #e63946;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    display: none;
}
.cart-count.show { display: flex; }

/* ============================
   HERO
   ============================ */
.hero {
    background: #1b4332 url('img/bkg-head.jpg') center/cover no-repeat;
    color: #fff;
    padding: 60px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(27,67,50,0.75) 0%, rgba(45,106,79,0.65) 50%, rgba(64,145,108,0.6) 100%);
    z-index: 0;
}
.hero-content,
.hero::before {
    z-index: 1;
}
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(149,213,178,0.08) 0%, transparent 60%);
    animation: pulse 8s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
.hero-content {
    position: relative;
    max-width: 700px;
    margin: 0 auto;
}
.hero h1 {
    font-size: clamp(32px, 5vw, 56px);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
}
.hero h1 span { color: #95d5b2; }
.hero p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 30px;
}
.hero-search {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: rgba(255,255,255,0.15);
    border-radius: 50px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}
.hero-search input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 16px 24px;
    font-size: 16px;
    color: #fff;
    outline: none;
    font-family: inherit;
}
.hero-search input::placeholder { color: rgba(255,255,255,0.6); }
.hero-search button {
    background: #95d5b2;
    border: none;
    padding: 16px 28px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    color: #1b4332;
    transition: background 0.3s;
    font-family: inherit;
}
.hero-search button:hover { background: #74c69d; }

/* ============================
   CATEGORIES SIDEBAR
   ============================ */
.layout {
    max-width: 1440px;
    margin: 30px auto 60px;
    padding: 0 20px;
    display: flex;
    gap: 28px;
    align-items: flex-start;
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    padding: 8px 0;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: #c8d6ce; border-radius: 4px; }

.sidebar-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #6b7f73;
    padding: 16px 18px 8px;
}
.sidebar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #1a2e24;
    transition: all 0.15s;
    border-left: 3px solid transparent;
    gap: 6px;
}
.sidebar-item:hover {
    background: #f0f5f1;
    border-left-color: #95d5b2;
}
.sidebar-item.active {
    background: #edf7f1;
    border-left-color: #2d6a4f;
    font-weight: 600;
    color: #1b4332;
}
.sidebar-item .arrow {
    font-size: 10px;
    color: #a0b0a6;
    transition: transform 0.2s;
}
.sidebar-item.open .arrow {
    transform: rotate(90deg);
}
.sidebar-item .count {
    font-size: 11px;
    background: #f0f5f1;
    color: #6b7f73;
    padding: 1px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.sidebar-sub {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.3s ease;
}
.sidebar-sub.open {
    max-height: 500px;
}
.sidebar-sub-item {
    padding: 8px 18px 8px 36px;
    font-size: 13px;
    color: #4a5e52;
    cursor: pointer;
    transition: all 0.15s;
    border-left: 3px solid transparent;
}
.sidebar-sub-item:hover {
    background: #f5faf7;
    color: #1b4332;
}
.sidebar-sub-item.active {
    background: #edf7f1;
    border-left-color: #40916c;
    font-weight: 600;
    color: #1b4332;
}

/* ============================
   MAIN CONTENT (right of sidebar)
   ============================ */
.main-content {
    flex: 1;
    min-width: 0;
    padding: 0;
}
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}
.products-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a2e24;
}
.products-header .count {
    color: #6b7f73;
    font-size: 15px;
}

/* Filter toggle button (mobile/tablet) */
.filter-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    background: #2d6a4f;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.2s;
}
.filter-toggle:hover { background: #1b4332; }
.filter-toggle .filter-icon { font-size: 16px; }

/* Sidebar header (mobile close button) */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}
.sidebar-close {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: #6b7f73;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}
.sidebar-close:hover { background: #f0f5f1; }
.sidebar-overlay { display: none; }

.loading-state {
    text-align: center;
    padding: 80px 20px;
    color: #6b7f73;
}
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e0e8e3;
    border-top: 4px solid #2d6a4f;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.products-grid.list {
    grid-template-columns: 1fr;
}

/* ============================
   PAGINATION
   ============================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 20px 0 10px;
}
.pag-btn {
    min-width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #e0e8e3;
    background: #fff;
    color: #1a2e24;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: inherit;
    padding: 0 10px;
}
.pag-btn:hover {
    border-color: #2d6a4f;
    background: #f0f5f1;
}
.pag-btn.active {
    background: #2d6a4f;
    color: #fff;
    border-color: #2d6a4f;
}
.pag-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
.pag-btn.prev-next {
    font-weight: 700;
    font-size: 16px;
}
.pag-info {
    font-size: 13px;
    color: #6b7f73;
    margin: 0 8px;
}

/* ============================
   PRODUCT CARD
   ============================ */
.product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.1);
}
.products-grid.list .product-card {
    flex-direction: row;
    align-items: center;
}
.products-grid.list .product-info { flex: 1; }

.product-img {
    height: 200px;
    background: #f8faf9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    color: #95d5b2;
    border-bottom: 1px solid #f0f5f1;
    position: relative;
    overflow: hidden;
}
.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
    padding: 8px;
}
.product-card:hover .product-img img {
    transform: scale(1.06);
}
.product-img .img-placeholder {
    font-size: 50px;
    color: #b8d4c4;
}
.product-img .img-count-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
    display: none;
}
.product-img .img-count-badge.show { display: block; }
.products-grid.list .product-img {
    height: 100px;
    width: 120px;
    border-bottom: none;
    border-right: 1px solid #f0f5f1;
    flex-shrink: 0;
}
.product-img .img-loading {
    position: absolute;
    inset: 0;
    background: #f0f5f1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-img .img-loading .mini-spin {
    width: 24px;
    height: 24px;
    border: 3px solid #e0e8e3;
    border-top-color: #2d6a4f;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.product-info {
    padding: 16px 18px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.product-brand {
    font-size: 12px;
    font-weight: 600;
    color: #6b7f73;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}
.product-name {
    font-size: 15px;
    font-weight: 600;
    color: #1a2e24;
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-code {
    font-size: 12px;
    color: #a0b0a6;
    margin-bottom: 10px;
}
.product-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid #f0f5f1;
}
.product-price {
    font-size: 22px;
    font-weight: 800;
    color: #1b4332;
}
.product-price .symbol {
    font-size: 14px;
}
.product-stock {
    font-size: 12px;
    color: #6b7f73;
}
.product-stock.ok { color: #2d6a4f; }
.product-stock.low { color: #e09f3e; }
.product-stock.out { color: #e63946; }

.add-btn {
    background: #2d6a4f;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    white-space: nowrap;
}
.add-btn:hover {
    background: #1b4332;
    transform: scale(1.03);
}
.add-btn:active { transform: scale(0.97); }

/* ============================
   CART SIDEBAR
   ============================ */
.cart-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s;
}
.cart-overlay.open {
    opacity: 1;
    pointer-events: all;
}
.cart-sidebar {
    position: fixed;
    top: 0; right: 0;
    width: 440px;
    max-width: 100vw;
    height: 100%;
    background: #fff;
    z-index: 2001;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
}
.cart-sidebar.open { transform: translateX(0); }

.cart-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f0f5f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cart-header h2 {
    font-size: 20px;
    font-weight: 700;
}
.cart-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7f73;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.cart-close:hover { background: #f0f5f1; }

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 24px;
}
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #a0b0a6;
}
.cart-empty .icon { font-size: 60px; margin-bottom: 15px; }

.cart-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid #f0f5f1;
}
.cart-item-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: #f8faf9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    overflow: hidden;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}
.cart-item-price {
    font-size: 15px;
    font-weight: 700;
    color: #1b4332;
}
.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}
.qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: inherit;
}
.qty-btn:hover { background: #f0f5f1; border-color: #2d6a4f; color: #2d6a4f; }
.qty-value {
    font-size: 15px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}
.cart-item-remove {
    background: none;
    border: none;
    color: #e63946;
    cursor: pointer;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
    font-family: inherit;
}
.cart-item-remove:hover { background: #fef0f0; }

.cart-footer {
    padding: 18px 24px 24px;
    border-top: 1px solid #f0f5f1;
    background: #fafcfa;
}
.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}
.cart-total-row .total-value { color: #1b4332; }
.checkout-btn {
    width: 100%;
    background: #2d6a4f;
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}
.checkout-btn:hover { background: #1b4332; transform: translateY(-2px); box-shadow: 0 8px 25px rgba(45,106,79,0.35); }

/* ============================
   CHECKOUT MODAL
   ============================ */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 35px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
}
.modal h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}
.modal .subtitle {
    color: #6b7f73;
    margin-bottom: 25px;
}
.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1a2e24;
    margin-bottom: 5px;
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e8e3;
    border-radius: 10px;
    font-size: 15px;
    transition: border-color 0.2s;
    font-family: inherit;
    background: #fafcfa;
}
.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #2d6a4f;
    background: #fff;
}
.form-group textarea { resize: vertical; min-height: 60px; }
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.submit-btn {
    width: 100%;
    background: #2d6a4f;
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 8px;
    font-family: inherit;
}
.submit-btn:hover { background: #1b4332; }
.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.modal-close {
    float: right;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7f73;
}

/* ============================
   TOAST
   ============================ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 5000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    background: #1a2e24;
    color: #fff;
    padding: 14px 22px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    animation: slideUp 0.35s ease;
    max-width: 360px;
    pointer-events: auto;
}
.toast.success { background: #2d6a4f; }
.toast.error { background: #e63946; }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
   ============================ */
.page-header {
    background: linear-gradient(135deg, #1b4332, #2d6a4f);
    color: #fff;
    padding: 40px 20px;
    text-align: center;
    margin: 20px !important;
}
.page-header h1 {
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.5px;
}
.page-header p {
    margin-top: 8px;
    opacity: 0.85;
    font-size: 16px;
}

/* ============================
   CONTENT PAGES (como, envios, donde)
   ============================ */
.page-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

/* Steps (Como Comprar) */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 30px;
}
.step-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}
.step-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.1);
}
.step-number {
    width: 56px;
    height: 56px;
    background: #2d6a4f;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    margin: 0 auto 16px;
}
.step-card h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}
.step-card p {
    color: #4a5e52;
    font-size: 15px;
    line-height: 1.7;
}

/* Shipping info cards */
.shipping-section {
    margin-bottom: 40px;
}
.shipping-section:last-child { margin-bottom: 0; }
.shipping-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}
.shipping-card:last-child { margin-bottom: 0; }
.shipping-card h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.shipping-card p {
    color: #4a5e52;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 12px;
}
.shipping-card .highlight {
    display: inline-block;
    background: #edf7f1;
    color: #1b4332;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 10px;
    font-size: 17px;
    margin-top: 8px;
}

/* Branch cards (sucursales) */
.branch-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 24px;
    transition: transform 0.3s, box-shadow 0.3s;
}
.branch-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}
.branch-card h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1b4332;
    margin-bottom: 6px;
}
.branch-card .address {
    font-size: 14px;
    color: #6b7f73;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.branch-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}
.branch-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #4a5e52;
}
.branch-detail-item .icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}
.branch-detail-item strong {
    display: block;
    font-size: 12px;
    color: #6b7f73;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 2px;
}

/* Contact form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}
.contact-form-wrap {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.contact-form-wrap h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
}
.contact-info-wrap h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}
.contact-info-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 16px;
}
.contact-info-card:last-child { margin-bottom: 0; }
.contact-info-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1b4332;
    margin-bottom: 4px;
}
.contact-info-card .sub {
    font-size: 13px;
    color: #6b7f73;
    margin-bottom: 10px;
}
.contact-info-card .row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4a5e52;
    padding: 4px 0;
}
.contact-info-card .row .icon { font-size: 16px; }

/* ============================
   FOOTER
   ============================ */
.site-footer {
    background: linear-gradient(135deg, #0d2818, #1b4332);
    color: #c8d6ce;
    padding: 50px 20px 30px;
}
.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
}
.footer-main {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}
.footer-col h3 {
    color: #95d5b2;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 14px;
}
.footer-col p,
.footer-col li {
    font-size: 14px;
    line-height: 1.8;
    color: #a0b8ac;
}
.footer-col ul {
    list-style: none;
}
.footer-col ul li a {
    color: #a0b8ac;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.footer-col ul li a:hover { color: #95d5b2; }
.footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}
.footer-social a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,255,255,0.08);
    color: #c8d6ce;
    padding: 8px 16px;
    border-radius: 10px;
    font-size: 13px;
    transition: all 0.2s;
}
.footer-social a:hover {
    background: rgba(255,255,255,0.15);
    color: #fff;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-bottom .copy {
    font-size: 13px;
    color: #587a68;
}
.footer-bottom .back-top a {
    color: #95d5b2;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s;
}
.footer-bottom .back-top a:hover { color: #fff; }

/* ============================
   RESPONSIVE — Mobile & Tablet
   ============================ */

/* === LARGE TABLETS (≤ 1024px) === */
@media (max-width: 1024px) {
    .sidebar { width: 220px; }
    .footer-main { grid-template-columns: 1fr 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .header-tagline { font-size: 12px; }
}

/* === SMALL TABLETS / LARGE PHONES (≤ 900px) === */
@media (max-width: 900px) {
    /* Top bar: icons-only mode */
    .top-bar { padding: 4px 12px; font-size: 12px; }
    .top-bar-links { gap: 8px; justify-content: center; }
    .top-bar-links a span.label { display: none; }
    .top-bar-links .divider { margin: 0 2px; }

    /* Nav: hamburger menu */
    .nav-menu { display: none; }
    .nav-menu.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 52px;
        left: 0;
        right: 0;
        background: #1b4332;
        padding: 8px;
        border-top: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
        z-index: 999;
    }
    .nav-menu.open li a {
        padding: 12px 16px;
        border-radius: 6px;
        font-size: 15px;
    }
    .nav-toggle { display: block; }
    .nav-actions .label { display: none; }

    /* ── Sidebar overlay (mobile/tablet) ── */
    .filter-toggle { display: inline-flex; }

    .layout { position: relative; }

    .sidebar-overlay {
        display: block;
        position: fixed;
        top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 4999;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }
    .sidebar-overlay.open {
        opacity: 1;
        pointer-events: all;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 300px;
        max-width: 85vw;
        height: 100%;
        z-index: 5000;
        background: #fff;
        border-radius: 0;
        box-shadow: 4px 0 30px rgba(0,0,0,0.2);
        padding: 0;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        display: block;
    }
    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-header {
        display: flex !important;
        padding: 16px 18px 8px;
    }
    .sidebar-close { display: block; }
    .sidebar-title {
        display: block !important;
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        color: #6b7f73;
        padding: 0;
    }
    .sidebar-item {
        white-space: nowrap;
        padding: 12px 18px;
        border-left: 3px solid transparent;
        border-bottom: none;
        font-size: 14px;
    }
    .sidebar-item:hover { border-left-color: #95d5b2; border-bottom: none; }
    .sidebar-item.active { border-left-color: #2d6a4f; border-bottom: none; }
    .sidebar-item .arrow { display: inline-block; }
    .sidebar-item .count { display: inline-flex; }
    .sidebar-sub { display: block; }
    .sidebar-sub-item { padding: 8px 18px 8px 36px; }
}

/* === PHONES (≤ 768px) === */
@media (max-width: 768px) {
    /* ── Header ── */
    .header { padding: 0 12px; }
    .header-inner { height: 56px; gap: 8px; }
    .header .logo img { height: 32px; }
    .header .logo img + img { height: 24px; }
    .header-tagline { display: none; }
    .header-actions { gap: 6px; }
    .header-actions .grid-btn { padding: 5px 8px; font-size: 13px; }
    .cart-btn { padding: 7px 12px; font-size: 13px; }
    .cart-btn span.label { display: none; }
    .cart-count { width: 20px; height: 20px; font-size: 10px; top: -5px; right: -5px; }
    .cart-sidebar { width: 100%; }

    /* ── Hero ── */
    .hero { padding: 32px 16px 50px; }
    .hero h1 { font-size: 26px; letter-spacing: -0.5px; }
    .hero p { font-size: 15px; margin-bottom: 20px; }
    .hero-search { max-width: 100%; border-radius: 30px; }
    .hero-search input { padding: 12px 16px; font-size: 15px; }
    .hero-search button { padding: 12px 18px; font-size: 13px; }

    /* ── Layout / Sidebar ── */
    .layout {
        flex-direction: column;
        padding: 0 12px 30px;
        margin: 16px auto 30px;
        gap: 12px;
    }
    /* ── Products ── */
    .products-header { margin-bottom: 16px; }
    .products-header h2 { font-size: 20px; }
    .products-header .count { font-size: 13px; }
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .products-grid.list { grid-template-columns: 1fr; }
    .product-img { height: 130px; font-size: 36px; }
    .products-grid.list .product-img { height: 80px; width: 90px; }
    .product-info { padding: 10px 12px 12px; }
    .product-brand { font-size: 11px; }
    .product-name { font-size: 13px; -webkit-line-clamp: 2; }
    .product-code { font-size: 11px; margin-bottom: 6px; }
    .product-footer { gap: 6px; padding-top: 8px; }
    .product-price { font-size: 17px; }
    .add-btn { padding: 7px 10px; font-size: 12px; gap: 4px; }

    /* ── Pagination ── */
    .pagination { gap: 4px; padding: 12px 0 6px; }
    .pag-btn { min-width: 34px; height: 34px; font-size: 13px; padding: 0 6px; }
    .pag-info { font-size: 11px; margin: 0 4px; }

    /* ── Cart ── */
    .cart-header { padding: 14px 16px; }
    .cart-header h2 { font-size: 17px; }
    .cart-items { padding: 12px 16px; }
    .cart-item { gap: 10px; padding: 10px 0; }
    .cart-item-img { width: 48px; height: 48px; font-size: 20px; }
    .cart-item-name { font-size: 13px; }
    .cart-item-price { font-size: 14px; }
    .qty-btn { width: 28px; height: 28px; font-size: 14px; }
    .qty-value { font-size: 13px; min-width: 20px; }
    .cart-footer { padding: 14px 16px 18px; }
    .cart-total-row { font-size: 16px; }
    .checkout-btn { padding: 14px; font-size: 15px; }

    /* ── Modal ── */
    .modal-overlay { padding: 12px; }
    .modal { padding: 20px; }
    .modal h2 { font-size: 20px; }
    .form-group input, .form-group textarea { padding: 10px 14px; font-size: 14px; }
    .form-row { grid-template-columns: 1fr; }
    .submit-btn { padding: 14px; font-size: 15px; }

    /* ── Page header (info pages) ── */
    .page-header { padding: 28px 16px; }
    .page-header h1 { font-size: 24px; }
    .page-header p { font-size: 14px; }

    /* ── Content pages ── */
    .page-content { padding: 20px 14px 36px; }
    .steps-grid { grid-template-columns: 1fr; gap: 16px; }
    .step-card { padding: 24px 20px; }
    .step-number { width: 48px; height: 48px; font-size: 20px; }
    .step-card h2 { font-size: 18px; }
    .step-card p { font-size: 14px; }
    .shipping-card { padding: 20px; }
    .shipping-card h2 { font-size: 18px; }
    .shipping-card p { font-size: 14px; }
    .shipping-card .highlight { font-size: 15px; padding: 6px 14px; }
    .branch-card { padding: 20px; }
    .branch-card h2 { font-size: 18px; }
    .branch-card .address { font-size: 13px; }
    .branch-details { grid-template-columns: 1fr; gap: 12px; }
    .contact-grid { grid-template-columns: 1fr; gap: 20px; }
    .contact-form-wrap { padding: 20px; }
    .contact-form-wrap h2 { font-size: 18px; }
    .contact-info-wrap h2 { font-size: 18px; }
    .contact-info-card { padding: 18px; }

    /* ── Footer ── */
    .site-footer { padding: 36px 16px 24px; }
    .footer-main { grid-template-columns: 1fr; gap: 24px; }
    .footer-col h3 { font-size: 14px; }
    .footer-col p, .footer-col li { font-size: 13px; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }
    .footer-bottom .copy { font-size: 12px; }

    /* ── Toast ── */
    .toast-container { bottom: 12px; right: 12px; left: 12px; }
    .toast { max-width: 100%; font-size: 13px; padding: 12px 16px; }

    /* ── Loading ── */
    .loading-state { padding: 50px 16px; }

    /* ── Main Nav ── */
    .main-nav-inner { height: 46px; padding: 0 12px; }
}

/* === SMALL PHONES (≤ 480px) === */
@media (max-width: 480px) {
    .header-inner { height: 50px; }
    .header .logo img { height: 28px; }
    .header .logo img + img { height: 20px; }
    .header-actions .grid-btn { padding: 4px 6px; font-size: 12px; }
    .cart-btn { padding: 5px 10px; font-size: 12px; }
    .products-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .product-img { height: 110px; }
    .product-price { font-size: 15px; }
    .product-name { font-size: 12px; }
    .hero h1 { font-size: 22px; }
    .hero p { font-size: 14px; }
    .hero-search input { padding: 10px 14px; font-size: 14px; }
    .hero-search button { padding: 10px 14px; font-size: 12px; }
    .top-bar { font-size: 11px; padding: 3px 8px; }
    .top-bar-links a .icon { font-size: 14px; }
    .branch-detail-item { font-size: 13px; }
    .page-header h1 { font-size: 22px; }
    .page-header { padding: 22px 12px; }
}


.qty-selector {
    display: flex;
    align-items: center;
    gap: 6px;
}
.qty-selector .qty-btn { width: 28px; height: 28px; font-size: 14px; border-radius: 8px; }
.qty-selector .qty-value { font-size: 14px; min-width: 22px; }
