
/* Prefer adding space under the header so slider stays same height */
.header {
  margin-bottom: var(--offerta-slider-gap-desktop) !important;
  z-index: 60; /* keep header above content */
}

/* Ensure slider itself has no extra top margin that increases its visible height  */
.slider {
  margin-top: 0 !important;
  box-sizing: border-box;
max-width: none !important;
}

.slider-bleed { overflow: visible !important; }

/* Mobile: smaller gap under header */
@media (max-width: 640px) {
  .header { margin-bottom: var(--offerta-slider-gap-mobile) !important; }
}

:root {
    --bg: #ffffff;
    --surface: #f7f7f8;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --brand: #1e7a62;
    --brand-2: #2aa36a;
    --danger: #ef4444;
    --shadow: 0 8px 24px rgba(0, 0, 0, .08);
    --radius: 14px;
}

* {
    box-sizing: border-box
}

html,
body {
    height: 100%
}


body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.45 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.header {
    position: sticky;
    /* stays visible when scrolling */
    top: 0;
    left: 0;
    width: 100%;
    /* span across page */
    z-index: 1000;
    /* always on top */
    background: var(--bg);
    border-bottom: 1px solid #ececec;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 14px 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit
}

.brand img {
    height: 50px;
    width: auto;
    display: block
}

.brand-title {
    font-weight: 800;
    letter-spacing: .2px
}

.actions {
    display: flex;
    align-items: center;
    gap: 10px
}

.btn {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 999px;
    /* pill shape */
    border: none;
    cursor: pointer;
    display: inline-block;
    font-size: 15px;
    letter-spacing: 0.3px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}


.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 16px 60px;
    /* ⬅ top padding increased */
}

.grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
    .grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 780px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

.badge {

    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    padding: 4px 10px;
    /* smaller padding */
    font-weight: 600;
    /* slightly lighter */
    font-size: 11px;
    /* reduced size */
    border-radius: 999px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, .12);
    position: absolute;
    top: 8px;
    /* move in closer */
    left: 8px;
}

.card-body {
    padding: 12px 14px 14px;
    display: grid;
    gap: 4px
}

.title {
    font-weight: 700
}

.shop {
    color: var(--muted);
    font-size: 14px
}

.price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.price-old {
    color: var(--muted);
    text-decoration: line-through
}

.price-new {
    font-weight: 800
}

.discount {
    color: var(--brand-2);
    font-weight: 800
}

.landmark {
    color: var(--muted);
    font-size: 13px
}

.card a {
    color: inherit;
    text-decoration: none
}

.card:hover {
    transform: translateY(-2px);
    transition: transform .15s ease
}

.footer {
    border-top: 1px solid #ececec;
    padding: 20px 16px;
    text-align: center;
    color: var(--muted);
}

/* Detail page */
.detail {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}

@media(max-width: 900px) {
    .detail {
        grid-template-columns: 1fr;
    }
}

.gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px
}

.gallery img {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #eee;
    object-fit: cover;
    aspect-ratio: 1/1
}

.section {
    background: var(--card);
    border: 1px solid #ececec;
    padding: 16px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.kv {
    display: grid;
    gap: 10px
}

.kv div {
    display: flex;
    justify-content: space-between;
    gap: 16px
}

.kv label {
    color: var(--muted)
}

.map {
    width: 100%;
    border: 0;
    border-radius: 12px;
    height: 280px;
    background: #e5e7eb
}

/* ---------------- Sidebar Filters ---------------- */
.sidebar {
    width: 260px;
    padding: 20px 18px;
    border-right: 1px solid #e0e0e0;
    background: #fafafa;
    position: fixed;
    top: 100px;
    /* ⬅ Push it down (same as header height) */
    left: 0;
    height: calc(100% - 100px);
    /* full height minus header */
    overflow-y: auto;
    z-index: 900;
    font-family: 'Segoe UI', Roboto, Arial, sans-serif;
}

.sidebar h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #111;
}

/* Search Bar */
.filter-search {
    margin-bottom: 20px;
}

.filter-search input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.filter-search input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 4px rgba(30, 122, 98, 0.3);
}

/* Filter sections */
.filter-section {
    margin-bottom: 25px;
}

.filter-section h4 {
    font-size: 15px;
    font-weight: 600;
    padding: 8px 0;
    margin: 0;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
}

.filter-section ul {
    list-style: none;
    padding-left: 0;
    margin: 10px 0 0;
}

.filter-section ul li {
    margin: 8px 0;
}

.filter-section ul li a {
    text-decoration: none;
    color: #444;
    font-size: 14px;
    transition: color 0.2s;
}

.filter-section ul li a:hover {
    color: var(--brand);
    font-weight: 500;
}

/* Collapsible toggle */
.collapsible {
    display: none;
    margin-top: 8px;
}

.collapsible.show {
    display: block;
}

.toggle-icon {
    font-size: 14px;
    color: #777;
    font-weight: bold;
}

/* Shift main content */
.content {

    /* min-height: calc(100vh - 80px); */
    /* full viewport minus header */
    /* display: flex; */
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.subcategory-list {
    display: none;
    /* hidden by default */
    margin-left: 15px;
    padding-left: 0;
    list-style: none;
}

.subcategory-toggle {
    display: block;
    cursor: pointer;
    font-weight: 600;
    margin: 6px 0;
    color: #333;
}

/* Add Product Page */
.page-title {
    text-align: center;
    margin-bottom: 20px;
    color: var(--brand);
}

.form-card {
    flex: 1;
    min-width: 320px;
    max-width: 500px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    /* Sticky behavior */
    position: sticky;
    top: 90px;
    /* adjust if your header is taller/shorter */
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 12px;
}


.form-card input,
.form-card select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
}

.form-card label {
    font-weight: 600;
    margin-top: 8px;
}

.row {
    display: flex;
    gap: 12px;
}

.row div {
    flex: 1;
}

.photo-preview img {
    max-width: 100px;
    margin-top: 10px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

/* Existing products */
.existing-products {
    margin-top: 80px;
}

.existing-products h3 {
    margin-bottom: 5px;
}

.muted {
    color: #777;
    font-size: 13px;
}

.product-card {
    display: flex;
    gap: 12px;
    padding: 12px;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fafafa;
}

.product-photo {
    width: 60px;
    height: 60px;
    background: #eee;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #555;
}

.discount {
    color: green;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .row {
        flex-direction: column;
    }
}

/* Layout for Add + Existing Products */
.product-layout {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    /* stack on smaller screens */
}

.form-card,
.existing-products {
    flex: 1;
    min-width: 100px;
    /* ensures stack on narrow screens */
}

/* Layout wrapper */
.main-container {
    /* display: flex; */
    align-items: flex-start;
}

/* Sidebar */
.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #eee;
    padding: 15px;
    position: sticky;
    top: 80px;
    /* adjust to header height */
    height: calc(100vh - 80px);
    overflow-y: auto;
}

/* Content */
.content {
    flex: 1;
    margin-left: 20px;
}


/* Product Card */
.card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 12px;
    text-align: left;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Hover effect */
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* Product Image */
.card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
}


/* Product Title */
.card h3 {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin: 6px 0;
}

/* Category text */
.card .category {
    font-size: 13px;
    color: #888;
    margin-bottom: 6px;
}

/* Pricing */
.card .price {
    font-size: 15px;
    color: #333;
}

.card .price del {
    color: #999;
    margin-right: 6px;
}

.card .discount {
    color: #1e7a62;
    font-weight: 600;
    margin-left: 6px;
}

/* Expiry */
.card .expiry {
    font-size: 12px;
    color: #777;
    margin-top: 8px;
}

/* View Offer button inside card image */
.view-offer-btn {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    /* prevent accidental clicks when hidden */
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Show on hover */
.card:hover .view-offer-btn {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(-2px);
}

/* ===========================
   Product List on Add Product Page
   =========================== */

.product-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
    background: #fff;
}

.product-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-info .thumb {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #777;
}

.product-actions button {
    margin-left: 8px;
}

.btn.small {
    padding: 4px 10px;
    font-size: 13px;
}

.btn.danger {
    background: #e53935;
    color: #fff;
}

/* Existing Products Section */
#existingProducts {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Compact product card */
.product-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px 14px;
    background: #fff;
    max-width: 600px;
    /* keep them smaller, not full-width */
    margin-left: auto;
    /* align to right side */
}

.product-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-info h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
}

.product-info p {
    margin: 0;
    font-size: 13px;
    color: #555;
}

.product-info .thumb {
    width: 45px;
    height: 45px;
    border-radius: 6px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #777;
}

/* Actions next to title */
.product-actions {
    display: flex;
    gap: 6px;
}

.btn.small {
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 6px;
}

.btn.danger {
    background: #e53935;
    color: #fff;
}

/* Layout for Add Product page */
.form-layout {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    flex-wrap: wrap;
    /* stack on smaller screens */
}

.form-section {
    flex: 2;
}

.existing-section {
    flex: 1.5;
    max-width: 400px;
}

/* Existing Products */
#existingProducts {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.product-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 12px;
    background: #fff;
}

.product-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-info h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.product-info p {
    margin: 2px 0;
    font-size: 12px;
    color: #555;
}

.product-info .thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #777;
}

.product-actions {
    display: flex;
    gap: 6px;
}

.btn.small {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 6px;
}

.btn.danger {
    background: #e53935;
    color: #fff;
}

/* Responsive stacking */
@media (max-width: 900px) {
    .form-layout {
        flex-direction: column;
    }

    .existing-section {
        max-width: 100%;
    }
}

.auth-card {
    max-width: 400px;
    margin: 40px auto;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    text-align: center;
}

.auth-card h2 {
    margin-bottom: 16px;
    color: var(--primary, #1a7f64);
}

.auth-card .form-group {
    margin-bottom: 16px;
    text-align: left;
}

.auth-card input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.auth-card .btn {
    width: 100%;
    margin-top: 8px;
}

.auth-card .note {
    margin-top: 16px;
    font-size: 0.9rem;
    color: #666;
}

.auth-card .note a {
    color: var(--primary, #1a7f64);
    font-weight: 600;
}

/* Login Page Layout */
.login-wrapper {
    display: flex;
    max-width: 900px;
    margin: 40px auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Left panel */
.login-left {
    flex: 1;
    background: #1a7f64;
    /* brand green */
    color: #fff;
    text-align: center;
    padding: 40px 20px;
}

.login-left h2 {
    margin-top: 20px;
    font-size: 24px;
}

.login-left p {
    margin-top: 8px;
    font-size: 15px;
    opacity: 0.9;
}

.login-illustration {
    max-width: 120px;
    margin-bottom: 20px;
}

/* Right panel */
.login-right {
    flex: 1;
    padding: 40px 30px;
}

.login-right label {
    font-weight: 600;
}

.login-right input {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.full-width {
    width: 100%;
    margin-top: 8px;
}

.terms {
    margin-top: 14px;
    font-size: 13px;
    color: #666;
}

.note {
    margin-top: 16px;
    font-size: 14px;
}

.note a {
    font-weight: 600;
    color: #1a7f64;
}

/* Responsive */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
    }

    .login-left {
        display: none;
    }
}

/* Owner info with dropdown */
.owner-info {
    position: relative;
    margin-left: 20px;
}

.owner-main {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
}

.shop-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.logout-btn {
    padding: 6px 12px;
    font-size: 13px;
    background: #e74c3c;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.logout-btn:hover {
    background: #c0392b;
}

/* Dropdown for phone & address */
.owner-details {
    position: absolute;
    top: 120%;
    left: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    padding: 8px 12px;
    font-size: 14px;
    display: none;
    min-width: 220px;
    z-index: 20;
}

.owner-details p {
    margin: 4px 0;
    color: #555;
}

/* Show on hover */
.owner-info:hover .owner-details {
    display: block;
}

/* Add Offer Trigger */
.add-offer-trigger {
    display: flex;
    justify-content: flex-start;
    margin: 20px 0 30px 10%;
}

/* Modal Overlay */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

/* Modal Box */
.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    width: 450px;
    max-width: 95%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
}

/* Close button */
.close-modal {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 24px;
    cursor: pointer;
    color: #555;
}

.close-modal:hover {
    color: #000;
}

/* Form inside modal */
#productForm {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#productForm input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

/* --- Action toolbar (centered version) --- */
.action-bar {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    /* <-- centers in page */
    padding: 14px 16px;
    margin: 24px auto 16px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .04);
    width: fit-content;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #e7e7e7;
    background: #f7f9fb;
    border-radius: 10px;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    transition: transform .06s ease, background .18s ease, box-shadow .18s ease;
}

.action-btn:hover {
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .06);
}

.action-btn:active {
    transform: translateY(1px);
}

.action-btn.brand {
    background: var(--brand, #1a7f64);
    border-color: var(--brand, #1a7f64);
    color: #fff;
}

.action-btn.brand:hover {
    background: var(--brand-2, #176c56);
}

.icon {
    font-size: 16px;
    line-height: 1;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
}

.status-dot.live {
    background: #1a7f64;
    box-shadow: 0 0 0 3px rgba(26, 127, 100, .12);
}

.status-dot.expired {
    background: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, .12);
}

.count {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #eef2f6;
    color: #3a5166;
    margin-left: 4px;
}

/* --- Multi-image uploader --- */
.image-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.image-slot {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    border: 1px dashed #cfd6dd;
    border-radius: 12px;
    background: #f8fafb;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.image-slot:hover {
    border-color: #a7b5c3;
    background: #fff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .06);
}

.image-slot input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.image-slot .add-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #6b7a88;
}

.image-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
    /* shown when loaded */
}

.image-slot.has-image .add-icon {
    display: none;
}

.image-slot.has-image img {
    display: block;
}

/* nicer select */
#productCategory {
    padding: 10px 12px;
    border: 1px solid #e1e6eb;
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
}

#productCategory:focus {
    outline: none;
    border-color: #9dc8bb;
    box-shadow: 0 0 0 3px rgba(26, 127, 100, .12);
}

/* small helper */
.muted {
    color: #718097;
    font-size: 12px;
}

/* ---------- Header owner info (hover details) ---------- */
.owner-info {
    position: relative;
    margin-left: 16px;
}

.owner-main {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
}

.shop-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #eef2f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.logout-btn {
    padding: 6px 12px;
    border-radius: 8px;
}

.owner-details {
    position: absolute;
    top: 120%;
    left: 0;
    background: #fff;
    border: 1px solid #e6e8eb;
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
    display: none;
    min-width: 240px;
}

.owner-details p {
    margin: 4px 0;
    color: #445260;
    font-size: 14px;
}

.owner-info:hover .owner-details {
    display: block;
}

/* ---------- Centered action toolbar ---------- */
.action-bar {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: center;
    padding: 14px 16px;
    margin: 24px auto 16px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .04);
    width: fit-content;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #e7e7e7;
    background: #f7f9fb;
    border-radius: 10px;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    transition: transform .06s ease, background .18s ease, box-shadow .18s ease;
}

.action-btn:hover {
    background: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .06);
}

.action-btn:active {
    transform: translateY(1px);
}

.action-btn.brand {
    background: var(--brand, #1a7f64);
    border-color: var(--brand, #1a7f64);
    color: #fff;
}

.action-btn.brand:hover {
    background: var(--brand-2, #176c56);
}

.icon {
    font-size: 16px;
    line-height: 1;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 99px;
    display: inline-block;
}

.status-dot.live {
    background: #1a7f64;
    box-shadow: 0 0 0 3px rgba(26, 127, 100, .12);
}

.status-dot.expired {
    background: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, .12);
}

.count {
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #eef2f6;
    color: #3a5166;
    margin-left: 4px;
}

/* ---------- Modal ---------- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, .5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    width: 520px;
    max-width: 95%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 24px;
    color: #6b7a88;
    cursor: pointer;
}

.close-modal:hover {
    color: #000;
}

/* ---------- Form ---------- */
.form-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-group label {
    font-weight: 600;
    color: #1f2a37;
    margin-bottom: 6px;
    display: block;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e1e6eb;
    border-radius: 10px;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #9dc8bb;
    box-shadow: 0 0 0 3px rgba(26, 127, 100, .12);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

/* ---------- Multi-image uploader ---------- */
.image-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.image-slot {
    position: relative;
    display: block;
    aspect-ratio: 1/1;
    border: 1px dashed #cfd6dd;
    border-radius: 12px;
    background: #f8fafb;
    overflow: hidden;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.image-slot:hover {
    border-color: #a7b5c3;
    background: #fff;
    box-shadow: 0 6px 14px rgba(0, 0, 0, .06);
}

.image-slot input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.image-slot .add-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #6b7a88;
}

.image-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: none;
}

.image-slot.has-image .add-icon {
    display: none;
}

.image-slot.has-image img {
    display: block;
}

.muted {
    color: #718097;
    font-size: 12px;
}

/* ---------- Live/Expired lists ---------- */
.offers-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 60vh;
    overflow: auto;
    margin-top: 8px;
}

.offer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fafafa;
}

.offer-row .meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
}

.offer-row .meta .name {
    font-weight: 700;
}

.offer-row .meta .shop {
    color: #666;
    font-size: 12px;
}

.offer-row .meta .price {
    font-size: 13px;
}

.offer-row .meta .expiry {
    font-size: 12px;
    color: #777;
}

.offer-row .actions {
    display: flex;
    gap: 8px;
}

.offer-row .btn.small {
    padding: 6px 10px;
    font-size: 12px;
}

/* ================================
   Offer Detail Page (scoped)
   Paste at END of styles.css
   ================================ */
/* small shop photo thumbnail */
.shop-photo img {
    height: 36px;
    width: 36px;
    object-fit: cover;
    border-radius: 6px;
    display: inline-block;
}

/* simple modal styles (centers the modal) */
.modal {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal .modal-content {
    background: #fff;
    border-radius: 8px;
    padding: 18px;
    max-width: 720px;
    width: 92%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
}

.modal .close-modal {
    background: none;
    border: 0;
    font-size: 20px;
    position: absolute;
    right: 12px;
    top: 8px;
    cursor: pointer;
}

#detailPage {
    background: var(--bg);
    color: var(--text);
}

/* Layout shell */
#detailPage .container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 100px 16px 60px;
    /* top space for fixed header */
}

#detailPage .grid {
    display: grid;
    gap: 16px
}

#detailPage .grid-lg {
    grid-template-columns: 1.15fr .85fr
}

@media(max-width:900px) {
    #detailPage .grid-lg {
        grid-template-columns: 1fr
    }
}

#detailPage .left-col,
#detailPage .right-col {
    gap: 16px
}

/* Cards */
#detailPage .card {
    background: var(--card);
    border: 1px solid #ececec;
    border-radius: var(--radius, 14px);
    box-shadow: var(--shadow);
}

#detailPage .card.pad {
    padding: 16px
}

/* Header bar (uses your existing header styles) */
#detailPage .brand img {
    height: 42px;
    width: auto;
    border-radius: 10px
}

#detailPage .brand-title {
    font-weight: 800;
    letter-spacing: .2px
}

/* Buttons (inherit your .btn) */
#detailPage .btn.primary {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    border: none;
}

#detailPage .btn.ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid #e7e7e7;
}

/* Title / Price row */
#detailPage .title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between
}

#detailPage .title h1 {
    font-size: 1.6rem;
    margin: 0
}

#detailPage .price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand);
    /* linter-safe */
}



#detailPage .muted {
    color: var(--muted)
}

/* Gallery */
#detailPage .gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px
}

#detailPage .gallery .hero {
    grid-column: 1/-1;
    aspect-ratio: 16/9;
    background: #f0f3f1;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid #ececec
}

#detailPage .gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 14px;
    cursor: pointer;
    border: 1px solid #ececec
}

#detailPage .thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px
}

@media(max-width:640px) {
    #detailPage .thumbs {
        grid-template-columns: repeat(3, 1fr)
    }
}

/* Key-Values grid */
#detailPage .kv {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px
}

@media(min-width:640px) {
    #detailPage .kv {
        grid-template-columns: repeat(3, 1fr)
    }
}

#detailPage .kv .item {
    background: #fafafa;
    border: 1px solid #ececec;
    padding: 12px 14px;
    border-radius: 14px
}

#detailPage .kv .k {
    font-size: .85rem;
    color: var(--muted)
}

#detailPage .kv .v {
    font-weight: 700
}

/* Description */
#detailPage .h3 {
    margin: 0 0 8px 0
}

#detailPage .desc {
    color: #374151;
    line-height: 1.6
}

/* Store card + actions */
#detailPage .store-card {
    display: flex;
    gap: 12px;
    align-items: center
}

#detailPage .store-card img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid #ececec;
    object-fit: cover;
    background: #f5f7f8
}

#detailPage .store-name {
    font-weight: 800
}

/* Map box */
#detailPage #map {
    height: 260px;
    border-radius: 14px;
    background: #f0f3f1;
    border: 1px solid #ececec
}

/* Utilities */
#detailPage .spacer-12 {
    height: 12px
}

/* ================================
   OFFER PAGE LAYOUT FIX (scoped)
   ================================ */

#detailPage main.container {
    /* make the page itself a 2-column grid */
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    /* left / right */
    gap: 24px;
}

/* kill any global .grid templates that leak in */
#detailPage .grid {
    display: block;
    /* default to 1 column */
    grid-template-columns: initial !important;
}

/* now explicitly stack columns inside left/right */
#detailPage .left-col,
#detailPage .right-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* cards fill the column width */
#detailPage .left-col>*,
#detailPage .right-col>* {
    width: 100%;
}

/* gallery layout */
#detailPage .gallery {
    display: grid;
    grid-template-columns: 1fr;
    /* hero on its own row */
    gap: 12px;
}

#detailPage .gallery .hero {
    grid-column: 1 / -1;
}

#detailPage .thumbs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width:640px) {
    #detailPage main.container {
        grid-template-columns: 1fr;
    }

    #detailPage .thumbs {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* key-value grid */
#detailPage .kv {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

/* safety: prevent any float/inline-width weirdness */
#detailPage .card {
    width: 100%;
}

/* =========================================================
   OFFER PAGE — Responsive sizing for web + mobile/webview
   (safe to paste at END of styles.css)
========================================================= */

/* ---- fluid scales you can tweak ---- */
:root {
    --page-max: 1040px;
    /* desktop max width */
    --space-y: clamp(10px, 2.2vw, 24px);
    /* vertical spacing */
    --card-pad: clamp(12px, 1.8vw, 18px);
    /* card padding */
    --radius: clamp(12px, 1.6vw, 16px);
    /* roundness */
    --fs-title: clamp(20px, 2.4vw, 32px);
    /* H1 size */
    --fs-sub: clamp(12px, 1.3vw, 14px);
    /* subtitle */
    --fs-price: clamp(18px, 2.1vw, 26px);
    /* price */
    --btn-py: clamp(8px, 1.2vw, 12px);
    /* button padding Y */
    --btn-px: clamp(12px, 2vw, 18px);
    /* button padding X */
    --btn-radius: clamp(10px, 2vw, 12px);
}

/* ---- page container + two-column layout ---- */
#detailPage main.container {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    /* desktop split */
    gap: clamp(14px, 2vw, 24px);
    max-width: var(--page-max);
    margin: 0 auto;
    padding: calc(var(--space-y) + 56px) 16px var(--space-y);
    /* header space */
}

@media (max-width: 1024px) {
    #detailPage main.container {
        grid-template-columns: 1fr;
        padding-top: calc(var(--space-y) + 40px);
    }
}

/* ---- cards & text sizing ---- */
#detailPage .card {
    border-radius: var(--radius);
    box-shadow: 0 6px 30px rgba(18, 25, 54, .06);
}

#detailPage .card.pad {
    padding: var(--card-pad);
}

#detailPage .title h1 {
    font-size: var(--fs-title);
    margin: 0 0 6px;
}

#detailPage .muted {
    font-size: var(--fs-sub);
}

#detailPage .price {
    font-size: var(--fs-price);
    font-weight: 800;
    color: var(--brand);
}

/* ---- header actions (Back / Get this offer) ---- */
#detailPage .actions .btn {
    padding: var(--btn-py) var(--btn-px);
    border-radius: var(--btn-radius);
    font-size: clamp(13px, 1.2vw, 15px);
}

@media (max-width: 520px) {

    /* stack buttons on tiny webviews */
    #detailPage .header-inner {
        flex-wrap: wrap;
        gap: 10px;
    }

    #detailPage .actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ---- column stacks ---- */
#detailPage .left-col,
#detailPage .right-col {
    display: flex;
    flex-direction: column;
    gap: clamp(10px, 1.6vw, 16px);
}

#detailPage .left-col>*,
#detailPage .right-col>* {
    width: 100%;
}

/* ---- gallery sizing (avoid huge hero on small screens) ---- */
#detailPage .gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

#detailPage .gallery .hero {
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

#detailPage .gallery .hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* cap the visible height so it doesn't dominate on mobile/webview */
    max-height: clamp(220px, 45vh, 520px);
}

#detailPage .thumbs {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 640px) {
    #detailPage .gallery .hero {
        aspect-ratio: 4 / 3;
    }

    #detailPage .thumbs {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---- key-values grid ---- */
#detailPage .kv {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 640px) {
    #detailPage .kv {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ---- description readability ---- */
#detailPage .desc {
    line-height: 1.6;
    font-size: clamp(14px, 1.4vw, 16px);
}

/* ---- store card + map ---- */
#detailPage .store-card img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

#detailPage #map {
    height: clamp(200px, 38vh, 280px);
    border-radius: var(--radius);
}

/* ---- tame any global .grid rules that leak in ---- */
#detailPage .grid {
    grid-template-columns: initial !important;
}

/* ===== Offer detail (one-product layout) ===== */
#detailPage .media-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

#detailPage .media-strip .slot {
    aspect-ratio: 4/3;
    background: #eef7ef;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, .06);
}

#detailPage .media-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media(max-width:800px) {
    #detailPage .media-strip {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Specs table */
#detailPage .specs {
    display: grid;
    gap: 10px;
}

#detailPage .specs .row {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

#detailPage .specs .row:last-child {
    border-bottom: none;
}

#detailPage .specs .k {
    color: #6b7280;
}

#detailPage .specs .v {
    text-align: right;
    font-weight: 600;
}

#detailPage #priceHeader {
    font-size: clamp(18px, 2.2vw, 22px);
}

/* ===== OFFER DETAIL: exact layout like screenshot ===== */
#detailPage .container {
    display: grid;
    grid-template-columns: 1.25fr .9fr;
    /* left / right */
    gap: 22px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 88px 16px 24px;
}

@media (max-width: 1024px) {
    #detailPage .container {
        grid-template-columns: 1fr;
    }
}

#detailPage .card {
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, .06)
}

#detailPage .card.pad {
    padding: 18px
}

#detailPage .detail-title {
    font-size: 28px;
    margin: 0 0 4px 0;
    line-height: 1.2
}

#detailPage .detail-sub {
    font-size: 14px
}

#detailPage .price-header {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 12px 0;
    color: #0f172a
}

/* Media strip (four small tiles) */
#detailPage .media-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 180px;
    gap: 16px;
}

#detailPage .media-strip .tile {
    width: 180px;
    height: 130px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .08);
    background: #e8f3ea;
    display: flex;
    align-items: center;
    justify-content: center;
}

#detailPage .media-strip img {
    width: 100%;
    height: 100%;
    object-fit: cover
}

@media (max-width: 900px) {
    #detailPage .media-strip {
        grid-auto-columns: 150px
    }

    #detailPage .media-strip .tile {
        width: 150px;
        height: 110px
    }
}

/* Specs table */
#detailPage .specs {
    display: grid;
    gap: 0;
    border-radius: 12px;
    overflow: hidden;
}

#detailPage .specs .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 2px;
    border-bottom: 1px solid #eef1f4;
}

#detailPage .specs .row:last-child {
    border-bottom: none
}

#detailPage .specs .k {
    color: #6b7280
}

#detailPage .specs .v {
    text-align: right;
    font-weight: 600;
    color: #111827
}

#detailPage .map-box {
    height: 260px;
    border-radius: 14px;
    overflow: hidden
}

#detailPage .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

#detailPage .brand img {
    height: 80px;
    /* match index header */
    width: auto;
    border-radius: 6px;
}

#detailPage .brand-title {
    font-size: 20px;
    /* match index */
    font-weight: 700;
    color: #111827;
}

/* =========================
   OFFER PAGE • Header
   ========================= */
:root {
    --offer-header-h: 72px;
    /* header height */
}

#detailPage .header {
    position: sticky;
    /* keep at top when scrolling */
    top: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 1px solid #eef1f4;
}

#detailPage .header-inner {
    max-width: 1200px;
    margin: 0 auto;
    height: var(--offer-header-h);
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#detailPage .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

#detailPage .brand img {
    height: 60px;
    /* match index logo size */
    width: auto;
    border-radius: 6px;
}

#detailPage .brand-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

#detailPage .actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* push content below sticky header */
#detailPage .container {
    padding-top: calc(var(--offer-header-h) + 16px) !important;
}




/* Optional: clearer success/error colors for the geo message */
#geoMsg {
    font-size: 13px;
}

#geoMsg.success {
    color: #0b8f55;
}

#geoMsg.error {
    color: #dc2626;
}

/* Small corrections */
.input:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .15);
}

/* .15 not 15 */
@media (max-width:720px) {

    .grid-two,
    .grid-three {
        grid-template-columns: 1fr;
    }
}


/* Expiry time picker styles */
.expiry-time-group {
    margin-top: 1rem;
}

.time-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
}

.time-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 8px 10px;
    border: 1px solid #e3e8ef;
    border-radius: 8px;
    background: #fff;
    font-size: 15px;
    min-width: 84px;
}

.time-select.ampm {
    min-width: 72px;
}

.time-sep {
    font-weight: 600;
    padding: 0 2px;
    color: #333;
}

@media (max-width:480px) {
    .time-select {
        min-width: 64px;
        padding: 7px;
        font-size: 14px;
    }
}

/* Header search */
.header-search {
    margin-left: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input#productSearch {
    width: 360px;
    max-width: 46vw;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    font-size: 14px;
    outline: none;
    transition: box-shadow 120ms ease, border-color 120ms ease;
}

.header-search input#productSearch:focus {
    border-color: var(--brand, #0466c8);
    box-shadow: 0 6px 18px rgba(4, 102, 200, 0.08);
}

.header-search .btn.small {
    padding: 6px 10px;
    font-size: 13px;
}

/* Subcategory list open/closed */
.subcategory-list {
    display: none;
    margin-left: 10px;
    padding-left: 10px;
    border-left: 1px solid rgba(0, 0, 0, 0.03);
}

.subcategory-list.open {
    display: block;
}

/* Toggle caret */
.subcategory-toggle {
    cursor: pointer;
    display: inline-block;
    user-select: none;
    font-weight: 600;
}

.subcategory-toggle::after {
    content: " ▸";
    margin-left: 6px;
    color: rgba(0, 0, 0, 0.45);
}

.subcategory-toggle.open::after {
    content: " ▾";
}

/* Highlight selected category link */
#categories a.active-cat {
    font-weight: 700;
    color: var(--brand, #0466c8);
    background: rgba(4, 102, 200, 0.06);
    padding: 4px 6px;
    border-radius: 6px;
}

/* Small screen adjustments */
@media (max-width: 720px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-search {
        width: 100%;
        order: 3;
        margin-left: 0;
    }

    .header-search input#productSearch {
        width: 100%;
        max-width: 100%;
    }
}

/* screen-reader only helper */
.sr-only {
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* Card layout adjustments to match requested order */
.card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.card-media img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Product name styling */
.product-name {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #123;
}

/* Price block */
.price-block {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 16px;
}

.price-offer {
    font-weight: 800;
    color: #0b6;
    margin-right: 6px;
}

.price-original {
    color: #999;
    font-size: 14px;
}

.discount {
    color: #198754;
    font-weight: 600;
    font-size: 14px;
}

/* Shop block */
.shop-block {
    margin-top: 6px;
}

.shop-name {
    font-weight: 600;
    color: #333;
}

.shop-meta {
    font-size: 13px;
    color: var(--muted, #666);
}

/* Expiry */
.expiry {
    font-size: 13px;
    color: var(--muted, #888);
    margin-top: 8px;
}

/* Actions keep as-is but slightly moved */
.product-actions {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    background: #fafafa;
    justify-content: flex-end;
}

/* ===== Compact card - tighter spacing (paste at end of styles.css) ===== */

/* overall card: slightly smaller and tighter margins */
.card {
    width: 220px;
    /* keep small card width */
    margin: 6px;
    /* less gap between cards */
    padding: 0;
    /* no extra inner padding on card itself */
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.035);
    overflow: hidden;
}

/* media (image) area: reduce height so less top space */
.card-media {
    padding: 0;
    background: transparent;
}

.card-media img,
.card img {
    width: 100%;
    height: 92px;
    /* smaller image height - reduces space at top */
    object-fit: cover;
    display: block;
    margin: 0;
    border-radius: 8px 8px 0 0;
    /* keep rounded top */
}

/* compact body spacing */
.card-body {
    padding: 8px 10px 40px;
    /* smaller top+side padding; bottom kept for hover button area */
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* product name: reduce size and top margin */
.product-name {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 4px 0;
    /* small gap below name */
    line-height: 1.15;
}

/* price row: smaller and tighter */
.price-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 13px;
    margin: 0;
    /* remove extra margin */
}

.price-new {
    font-size: 15px;
    font-weight: 800;
}

.price-old {
    font-size: 13px;
    color: #999;
}

.discount {
    font-size: 12px;
    color: #198754;
}

/* shop & address: single-line shop and compact address */
.shop {
    margin-top: 4px;
}

.shop-name {
    font-size: 13px;
    margin: 0 0 2px 0;
    font-weight: 600;
    color: #333;
}

.shop-address {
    font-size: 12px;
    color: var(--muted, #666);
    margin: 0;
    line-height: 1.25;
}

/* expiry: smaller and closer */
.expiry {
    font-size: 12px;
    color: var(--muted, #888);
    margin-top: 6px;
}

/* View button area: keep absolute but shift a bit and reduce size */
.view-btn-container {
    position: absolute;
    right: 10px;
    bottom: 10px;
    opacity: 0;
    transform: translateY(6px) scale(0.98);
    transition: opacity 180ms ease, transform 180ms ease;
    pointer-events: none;
}

/* Modal general styling */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    /* padding around content so it doesn't hit edges */
}

/* Modal box */
.modal .modal-content {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    width: 100%;
    max-width: 600px;
    /* narrower width (adjust if you prefer 700px) */
    max-height: 90vh;
    /* fit within 90% of viewport height */
    overflow-y: auto;
    /* scroll inside if content is taller */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    position: relative;
}

/* Ensure form fields shrink nicely on smaller screens */
.modal .form-group input,
.modal .form-group select,
.modal .form-group textarea {
    width: 100%;
    box-sizing: border-box;
}

/* Close button consistent positioning */
.modal .close-modal {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.card:hover .view-btn-container,
.card:focus-within .view-btn-container {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

a.btn.view-btn {
    padding: 7px 12px;
    font-size: 13px;
    border-radius: 999px;
}

/* remove any residual grey bar by forcing transparent backgrounds */
.card-media,
.card {
    background: #fff;
}

/* responsive */
@media (max-width: 520px) {
    .card {
        width: calc(50% - 14px);
    }

    .card-media img {
        height: 80px;
    }

    .card-body {
        padding-bottom: 38px;
    }

    /* small shop photo thumbnail */
    .owner-info .shop-photo img {
        height: 36px;
        width: 36px;
        object-fit: cover;
        border-radius: 6px;
        display: inline-block;
    }

}


.footer {
    padding: 20px;
    text-align: center;
    background: #f7f7f7;
    /* adjust to your theme */
}

.app-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.store-badge {
    height: 50px;
    /* force same height */
    width: auto;
    /* keep original aspect ratio */
    object-fit: contain;
    transition: transform 0.2s ease;
}

.store-badge:hover {
    transform: scale(1.05);
}

.footer-text {
    font-size: 14px;
    color: #666;
}

.footer-links {
    margin: 10px 0;
    font-size: 14px;
}

.footer-links a {
    color: #1e7a62;
    /* match your theme green */
    text-decoration: none;
    margin: 0 5px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #145a47;
    /* darker green on hover */
    text-decoration: underline;
}

.auth-footer {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-top: 30px;
    padding: 15px;
}

.footer-powered {
    font-size: 13px;
    color: #999;
    /* lighter grey */
    margin-top: 5px;
}

/* Equal height images for all cards */
.card-media {
    width: 100%;
    height: 200px;
    /* fixed uniform height */
    overflow: hidden;
    border-bottom: 1px solid #eee;
    /* optional neat separation */
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* fills box, keeps aspect ratio */
    display: block;
}


/* Page shell */
body {
    margin: 0;
    font-family: Inter, system-ui, Arial, sans-serif;
    background: #f7fafc;
    color: #0f172a;
}

/* Wrapper */
.registration-wrapper {
    max-width: 1100px;
    margin: 40px auto;
    display: flex;
    border-radius: 14px;
    overflow: hidden;
    align-items: stretch;
    box-shadow: 0 12px 40px rgba(9, 30, 66, 0.06);
    background: #fff;
}

/* Left */
.registration-left {
    flex: 1;
    min-width: 300px;
    /* a bit narrower too */
    padding: 28px 24px;
    /* was 48px 36px → now tighter */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(180deg, var(--brand), var(--brand-2));
    color: #fff;
    gap: 10px;
    /* reduce spacing between elements */
}

.login-illustration {
    width: 180px;
    max-width: 90%;
    height: auto;
    display: block;
    margin: 0 auto 18px;
    border-radius: 8px;
    filter: drop-shadow(0 8px 22px rgba(0, 0, 0, .12));
}

.registration-left h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
}

.registration-left p {
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    text-align: center;
    max-width: 300px;
    line-height: 1.45;
}

/* Right / card */
.registration-right {
    flex: 1;
    padding: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.card.pad {
    width: 380px;
    padding: 18px;
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.form-title {
    font-size: 20px;
    margin: 0 0 10px 0;
    font-weight: 800;
    color: #0f172a;
}

/* Form grid
   - default: two columns
   - use .span-2 on items that must span both cols
*/
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

/* single-column container (for phone/otp) */
.form-grid--single {
    grid-template-columns: 1fr;
}

/* form-group: label above input */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 6px;
}

.form-group label {
    font-weight: 600;
    font-size: 13px;
    color: #081827;
}

.req {
    color: #dc2626;
    margin-left: 4px;
}

/* make element span both columns */
.span-2 {
    grid-column: 1 / -1;
}

/* inputs/buttons */
.input {
    padding: 9px 12px;
    border-radius: 10px;
    border: 1px solid #e6e9ec;
    min-height: 36px;
    font-size: 14px;
    background: #fff;
}

.input:focus {
    outline: none;
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.06);
    border-color: rgba(30, 122, 98, 0.12);
}

.phone-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.code-btn {
    min-width: 66px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #eef3f2;
    background: #fff;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(10, 20, 30, 0.04);
}

.row {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    cursor: pointer;
    background: #fff;
}

.btn.brand {
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    border: none;
    padding: 9px 14px;
    font-weight: 700;
    box-shadow: 0 10px 26px rgba(26, 127, 100, 0.12);
}

.small {
    min-width: 72px;
}

/* helper */
.sep {
    border: none;
    border-top: 1px solid #eef1f4;
    margin: 10px 0;
}

.muted {
    color: var(--muted);
    font-size: 13px;
}

/* actions */
.actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Responsive: stack on small screens */
@media (max-width:880px) {
    .registration-wrapper {
        flex-direction: column;
        margin: 16px;
    }

    .registration-left {
        display: none;
    }

    .registration-right {
        padding: 18px;
    }

    /* Compact card */
    /* Reduce card width and padding */
    .card.pad {
        width: 360px;
        /* was ~400px, tighter card */
        padding: 16px 18px;
        /* was 20px+ */
    }

    /* Reduce vertical spacing between form groups */
    .form-group {
        margin-bottom: 8px;
        /* was 12–14px */
    }

    /* Smaller inputs */
    .input {
        min-height: 34px;
        /* was 40–44px */
        padding: 8px 10px;
        /* was 10–12px */
        font-size: 14px;
    }

    /* Buttons also smaller */
    .btn {
        padding: 7px 12px;
        /* was 10–14px */
        font-size: 14px;
    }

    .btn.brand {
        padding: 8px 14px;
    }

    /* Shrink section separators */
    .sep {
        margin: 8px 0;
        /* was 12px */
    }
}

/* ====== Header visuals: force correct look ====== */
/* Big right-side pill (Store Owner Login) */
.header .btn {
    background: linear-gradient(135deg, var(--brand), var(--brand-2)) !important;
    color: #fff !important;
    padding: 12px 28px !important;
    /* larger pill */
    border-radius: 999px !important;
    border: none !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15) !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Small action button inside header-search (Clear) */
.header-search .btn,
.header-search .btn.small {
    background: linear-gradient(135deg, var(--brand), var(--brand-2)) !important;
    color: #fff !important;
    padding: 6px 12px !important;
    border-radius: 10px !important;
    border: none !important;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12) !important;
    font-weight: 700 !important;
    font-size: 13px !important;
}

/* Search input visual (rounded white with subtle shadow) */
.header-search input#productSearch,
.header-search input[type="search"] {
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 10px !important;
    padding: 10px 14px !important;
    box-shadow: 0 10px 26px rgba(16, 24, 40, 0.06) inset, 0 4px 14px rgba(0, 0, 0, 0.06);
    outline: none !important;
    transition: box-shadow 160ms ease, border-color 160ms ease, transform 120ms ease;
}

/* Focus state */
.header-search input#productSearch:focus,
.header-search input[type="search"]:focus {
    border-color: var(--brand) !important;
    box-shadow: 0 10px 26px rgba(16, 24, 40, 0.06) inset, 0 8px 26px rgba(30, 122, 98, 0.12) !important;
}

/* If any link (<a>) is used as the large login button ensure it looks same */
.header .btn[href] {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Small safeguard: prevent other rules removing background/shadow */
.header .btn,
.header-search .btn,
.header-search input#productSearch {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.footer-inner {
    display: flex;
    justify-content: center;
    /* center everything horizontally */
    align-items: center;
    position: relative;
    /* so right links can be positioned */
}

.footer-text {
    text-align: center;
    flex: 1;
    /* take center space */
}

*.footer-powered a {
    color: var(--brand);
    /* use your green brand color */
    font-weight: 600;
    text-decoration: none;
}

.footer-powered a:hover {
    text-decoration: underline;
}

.footer-powered {
    text-align: center;
    /* center Powered by line */
    font-size: 16px;
    color: #666;
    margin-top: 0;
    /* remove extra gap */
}

.footer-text {
    text-align: center;
    /* center copyright line */
    color: var(--brand);
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 16px;
    /* ⬅ bigger size for © line */
    /* add little space below */
}


/* Footer 2: Site footer */
.footer-columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    text-align: left;
    background: #f7f7f7;
    /* new line: create space for pinned badges */
    
}

.footer-col {
    flex: 1;
    min-width: 240px;
}

.footer-logo {
    height: 30px;
    margin-bottom: 10px;
}

.footer-desc {
    font-size: 14px;
    color: #444;
    margin: 8px 0 12px 0;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background-color: #1e7a62;
    /* green background */
    color: #fff;
    transition: background-color 0.2s ease;
}

.footer-social a img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}

.footer-social a svg {
    stroke: #fff;
    /* Instagram outline white */
}

.footer-social a:hover {
    background-color: #145a47;
}

.footer-right {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    /* push to bottom */
    align-items: flex-end;
    /* align right */
    text-align: right;
    gap: 4px;
}

.footer-right h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #1e7a62;
}

.footer-right p {
    margin: 2px 0;
    font-size: 15px;
    color: #444;
}

.footer-links {
    margin-top: 10px;
    font-size: 14px;
    font-weight: 600;
}

.footer-links a {
    color: #1e7a62;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-links {
    margin-top: 8px;
    font-size: 14px;
}

.footer-powered a {
    color: #1e7a62;
    text-decoration: none;
}

.footer-powered a:hover {
    color: #145a47;
}

/* Placeholder icons */
.icon-linkedin::before {
    content: 'in';
    font-weight: bold;
}

.icon-facebook::before {
    content: 'f';
    font-weight: bold;
}

/* Ensure pinned app badges don't overlap page content */
body {
    padding-bottom: 90px;
    /* match pinned-badges height + padding */
}

/* Push page content above pinned badges */
.offer-page,
.add-product-page,
.store-login,
.store-registration,
.privacy-page,
.terms-page {
    padding-bottom: 90px;
    /* same height as pinned-badges */
}

.app-badges {
    display: flex;
    justify-content: center;
    /* center horizontally */
    gap: 12px;
    /* space between badges */
    margin-top: 20px;
    /* space above badges */
    flex-wrap: wrap;
    /* keep responsive on small screens */
}

.app-badges img.store-badge {
    height: 40px;
    width: auto;
}

/* Unified pinned badges style */
.app-badges-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 8px 0;
    background: #fff;
    border-top: 1px solid #ddd;
    z-index: 9999;
}

.app-badges-fixed img.store-badge {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}

.app-badges-fixed img.store-badge:hover {
    transform: scale(1.05);
}

/* Ensure fixed badges never overlap content: reserve space at the end of the document */
:root {
    --app-badge-bar-height: 90px;
}

body::after {
    content: "";
    display: block;
    height: var(--app-badge-bar-height);
    width: 100%;
    pointer-events: none;
}

/* Make sure the pinned bar aligns with that height */
.app-badges-fixed {
    height: var(--app-badge-bar-height);
}

/* --- Modal small anchored style --- */
.modal.anchored {
    position: absolute !important; /* placed by JS */
    background: transparent;
    display: block; /* JS will control show/hide */
    top: auto;
    left: auto;
    right: 24px; /* fallback offset from right */
    z-index: 9999;
}

    .modal.anchored .modal-content {
        width: 420px; /* smaller width */
        max-width: calc(100vw - 40px);
        max-height: 72vh; /* keep it from overflowing viewport */
        overflow-y: auto;
        padding: 18px;
        border-radius: 12px;
        box-shadow: 0 12px 40px rgba(0,0,0,0.12);
        transform-origin: right top;
    }

    /* Small tweak for close button spacing when anchored */
    .modal.anchored .close-modal {
        position: absolute;
        right: 12px;
        top: 12px;
    }
/* Offer list */
.offer-row.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
}

.offer-thumb img {
    display: block;
    border-radius: 6px;
}

.offer-body {
    flex: 1;
    min-width: 0;
}

.offer-title {
    font-weight: 600;
    margin-bottom: 6px;
}

.offer-meta, .offer-expires {
    color: #666;
    font-size: 13px;
    margin-bottom: 4px;
}

.offer-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Small responsive tweak */
@media (max-width:720px) {
    .offer-row.card {
        flex-direction: column;
        align-items: flex-start;
    }

    .offer-thumb img {
        width: 100%;
        height: auto;
    }
}

/* Edit modal card inside dynamic modal */
.modal > .card {
    max-height: 84vh;
    overflow: auto;
}
/* --- Offer Cards Styling Override --- */
.offer-card.card {
    display: flex;
    flex-direction: column;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}

    .offer-card.card:hover {
        transform: translateY(-3px);
    }

/* Thumbnail */
.offer-card .offer-thumb img {
    width: 100%;
    height: 160px; /* fix height for uniform grid */
    object-fit: cover;
    border-bottom: 1px solid #eee;
    display: block;
}

/* Body */
.offer-card-body {
    padding: 10px 12px;
}

    .offer-card-body .offer-title {
        font-size: 1rem;
        font-weight: 600;
        margin: 0 0 6px;
    }

    .offer-card-body .offer-shop {
        font-size: 0.85rem;
        color: var(--muted);
        margin-bottom: 6px;
    }

    .offer-card-body .offer-prices {
        font-size: 0.9rem;
        margin-bottom: 4px;
    }

    .offer-card-body .offer-expires {
        font-size: 0.8rem;
        color: var(--muted);
    }
/* === Offerta: Compact centered modal overrides (added Oct 2025) === */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(0,0,0,0.36);
    padding: 20px;
    align-items: center;
    justify-content: center;
}

/* small modal layout */
.modal-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.18);
    max-width: 420px;
    width: 100%;
    padding: 14px;
    position: relative;
    box-sizing: border-box;
}

    .modal-content.modal-small {
        max-width: 420px;
        padding: 14px;
    }

    /* header + close button */
    .modal-content h2 {
        margin: 6px 0 10px;
        font-size: 1.05rem;
    }

.close-modal {
    position: absolute;
    right: 10px;
    top: 8px;
    font-size: 20px;
    background: transparent;
    border: 0;
    cursor: pointer;
}

/* form layout */
.modal .form-group {
    margin-bottom: 8px;
}

    .modal .form-group label {
        display: block;
        font-size: 0.92rem;
        margin-bottom: 6px;
    }

    .modal .form-group input,
    .modal .form-group select {
        padding: 8px 10px;
        border-radius: 8px;
        font-size: 0.95rem;
    }

/* image grid compact */
.image-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 6px;
}

.image-slot {
    height: 78px;
    border-radius: 8px;
    border: 1px dashed #e6e6e6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #fafafa;
}

    .image-slot img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .image-slot .add-icon {
        font-size: 20px;
        color: #999;
    }

/* ---------- SLIDER BLEED (edge-to-edge) ---------- */
/* Adjust .page-wrapper max-width value to match your site if needed */
.page-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
}

/* Bleed the slider full width while keeping main content centered */
.slider-bleed,
#mainSlider,
#slidesTrack,
.slide {
    width: 100%;
    /* use 100% of parent instead of 100vw */
    max-width: 100%;
    margin: 0 auto;
    left: 0 !important;
    transform: none !important;
    /* cancel translateX(-50%) overflow */
    box-sizing: border-box;
    overflow: hidden;
}

/* ---------- SLIDER CORE ---------- */
.slider {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 360px;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f0fdf4 100%);
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(8, 10, 15, 0.06);
}


.slides {
    display: flex;
    transition: transform 480ms cubic-bezier(.2, .9, .3, 1);
    will-change: transform;
    height: 100%;
}

.slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}


.slide .slide-caption {
    position: absolute;
    left: 18px;
    bottom: 18px;
    color: #fff;
    background: rgba(0, 0, 0, 0.28);
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 600;
}

/* Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: none;
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.36);
    color: #fff;
    z-index: 20;
}

.slider-arrow.prev {
    left: 12px;
}

.slider-arrow.next {
    right: 12px;
}

/* Dots */
.slider-dots {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 12px;
    display: flex;
    gap: 8px;
    z-index: 20;
}

.slider-dots button {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    padding: 0;
}

.slider-dots button.active {
    background: #fff;
}

/* Responsive slider height */
@media (max-width: 640px) {
    .slider {
        height: 220px;
        border-radius: 6px;
    }
}

/* ---------- OFFERS GRID: 5 on desktop, 3 on mobile (smooth resizing) ---------- */
.grid {
    display: grid;
    gap: 16px;
    margin-top: 20px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    transition: all 160ms ease;
}

/* Force counts at breakpoints to ensure 5 / 3 behavior */
@media (min-width: 1200px) {
    .grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* desktop: 5 */
@media (max-width: 1199px) and (min-width: 900px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* large tablet */
@media (max-width: 899px) and (min-width: 380px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* mobile: 3 */
@media (max-width: 379px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Offer Card Modern Style (like Screenshot 2) ===== */
.offer-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}

.offer-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* Image section */
.offer-image {
  position: relative;
  width: 100%;
  height: 190px;
  background: #f9fafb;
  overflow: hidden;
}
.offer-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Rounded badge */
.offer-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #16a34a;
  color: #fff;
  padding: 4px 10px;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}



/* Expiry */
.offer-expiry {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    /* light gray background */
    color: #374151;
    /* dark gray text */
    font-size: 0.82rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 999px;
    /* pill shape */
    width: fit-content;
    margin-top: 6px;
}

.offer-expiry::before {
    content: "🕒";
    font-size: 0.9rem;
    line-height: 1;
}

/* Hover zoom on image (desktop only) */
@media (hover:hover) and (pointer:fine) {
  .offer-card:hover .offer-image img {
    transform: scale(1.05);
    transition: transform .35s ease;
  }
}
.offer-badge {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.offer-card:hover .offer-badge {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ------------------ Modern Offer Card (replace existing block) ------------------ */

/* Card wrapper (the anchor .offer-link wraps this article card) */
.offer-card {
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(11,15,20,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 220ms cubic-bezier(.2,.9,.3,1), box-shadow 220ms cubic-bezier(.2,.9,.3,1);
  position: relative;
  min-height: 320px; /* ensures consistent card height — adjust if needed */
}

/* Make whole card clickable; anchor wrapper should not change layout */
.offer-link { text-decoration: none; color: inherit; display:block; height:100%; }

/* Image area */
.offer-image {
  position: relative;
  width: 100%;
  height: 200px;               /* default image height (desktop) */
  background: linear-gradient(180deg,#f8fafc 0%, #ffffff 100%);
  display: block;
  overflow: hidden;
}
@media (min-width: 1200px) { .offer-image { height: 220px; } } /* slightly taller on wide screens */
@media (max-width: 480px) { .offer-image { height: 160px; } }  /* mobile compact */

/* Slide-in/zoom image effect */
.offer-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 380ms cubic-bezier(.2,.9,.3,1);
  will-change: transform;
  backface-visibility: hidden;
}

/* Discount badge (top-left) */
.offer-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg,#16a34a,#059669); /* default green */
  color: #fff;
  font-weight: 800;
  font-size: 0.82rem;
  box-shadow: 0 6px 18px rgba(6,8,12,0.12);
  opacity: 0;                    /* hidden by default; reveals on hover */
  transform: translateY(-4px) scale(0.95);
  transition: opacity 260ms ease, transform 260ms ease, box-shadow 260ms ease;
  z-index: 30;
}

/* small circle showing percent */
.pct-circle {
  min-width: 34px;
  height: 34px;
  border-radius: 999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,0.12);
  font-weight: 900;
  font-size: 0.88rem;
}

/* Hover effects (only for pointer devices) */
@media (hover: hover) and (pointer: fine) {
  .offer-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 18px 48px rgba(11,15,20,0.12);
  }
  .offer-card:hover .offer-image img { transform: scale(1.06); }
  .offer-card:hover .offer-badge { opacity: 1; transform: translateY(0) scale(1); }
}

/* Fallback: show badge slightly (non-hover) if device has no hover support */
@media (hover: none) {
  .offer-badge { opacity: 0.9; transform: none; }
}

/* Body content */
.offer-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 120px;
}

/* Title and link */
.offer-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #0f172a;
  text-decoration: none;
  line-height: 1.15;
  margin-bottom: 2px;
}
.offer-title a { color: inherit; text-decoration: none; }

/* Brand / subtitle */
.offer-brand {
  color: #6b7280;
  font-size: 0.86rem;
  margin-top: -2px;
}

/* Price block */
.offer-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: 6px;
}
.price-offer {
  font-weight: 900;
  font-size: 1.08rem;
  color: #0f172a;
}
.price-original {
  color: #9ca3af;
  text-decoration: line-through;
  font-size: 0.94rem;
}

/* Expiry pill (dynamic classes: normal, warn, soon, expired) */
.offer-expiry {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f3f4f6;     /* default light gray */
  color: #374151;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 999px;
  width: fit-content;
  margin-top: 8px;
  box-shadow: 0 6px 16px rgba(10,12,16,0.03);
}

/* expiry states */
.offer-expiry.normal { background: #f3f4f6; color: #374151; }   /* >72 hrs */
.offer-expiry.warn   { background: #fff7ed; color: #92400e; }   /* 24-72 hrs */
.offer-expiry.soon   { background: #fff1f2; color: #9f1239; }   /* <24 hrs */
.offer-expiry.expired{ background: #fee2e2; color: #991b1b; }   /* expired */

/* small clock icon via pseudo-element */
.offer-expiry::before { content: "🕒"; font-size: 0.95rem; line-height:1; }

/* Accessibility: keyboard focus */
.offer-card:focus-within {
  outline: 3px solid rgba(34,197,94,0.12);
  transform: translateY(-6px);
  box-shadow: 0 14px 36px rgba(11,15,20,0.10);
}

/* Make sure images and cards don't overflow container */
.offer-card, .offer-image img { max-width: 100%; box-sizing: border-box; }

/* Grid small tweaks: ensure cards keep consistent aspect in grid */
@media (min-width: 1200px) {
  .offer-card { min-height: 340px; }
}
@media (max-width: 900px) {
  .offer-card { min-height: auto; }
  .offer-image { height: 180px; }
}

/* Tiny utilities */
.truncate-1 { overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:1; -webkit-box-orient:vertical; }
.truncate-2 { overflow:hidden; text-overflow:ellipsis; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }

/* If you had older .offer-badge rules, ensure this wins without !important usage */
/* ===== Offerta: content width & card fixes to remove side gaps ===== */

/* 1) Make page-wrapper and main use same centered max width so slider and grid align */
.page-wrapper,
.main,
.header-inner,
#detailPage .container {
  max-width: 1200px;    /* unify the content width (adjust if you prefer 1100/1400) */
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* If you want a slightly wider layout on large desktops, increase this value */
/* e.g. use 1400px instead of 1200px if you prefer denser cards on wide screens */

/* 2) Keep slider-bleed full viewport, but ensure no horizontal overflow */
.slider-bleed {
  width: 100vw;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;         /* remove negative margins if present to avoid double offsets */
  padding: 0;
  box-sizing: border-box;
  position: relative;
}

/* 3) Let grid fill the content container and control per-breakpoint columns.
   Remove any fixed widths on cards so grid controls spacing. */
.main .grid,
.page-wrapper .grid {
  width: 100%;
  box-sizing: border-box;
  gap: 18px;
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* default desktop density (override by media queries below) */
  align-items: start;
  padding: 0 18px; /* small internal padding so content doesn't touch edges */
}

/* responsive column counts — you already have breakpoints; adapt if needed */
@media (min-width: 1400px) {
  .main .grid, .page-wrapper .grid { grid-template-columns: repeat(6, 1fr); padding: 0 28px; }
}
@media (min-width: 1200px) and (max-width: 1399px) {
  .main .grid, .page-wrapper .grid { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .main .grid, .page-wrapper .grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 767px) {
  .main .grid, .page-wrapper .grid { grid-template-columns: repeat(3, 1fr); padding: 0 12px; }
}
@media (max-width: 420px) {
  .main .grid, .page-wrapper .grid { grid-template-columns: repeat(2, 1fr); }
}

/* 4) Remove the fixed card width and margins (these were causing leftover space) */
.card {
  width: auto !important;
  margin: 0 !important;
  padding: 0; /* card inner padding comes from .card-body etc. */
  box-sizing: border-box;
}

/* Keep a neat card visual — image fill and equal heights */
.card-media { width: 100%; height: 220px; overflow: hidden; border-bottom: 1px solid #eee; }
.card-media img { width:100%; height:100%; object-fit:cover; display:block; }

/* 5) Ensure header spacing doesn't add extra visual gap (you already set header fixed) */
.header-inner { padding-left: 28px; padding-right: 28px; max-width: 1200px; margin: 0 auto; }
/* ===== Fix horizontal overflow caused by slider-bleed ===== */

/* Stop 100vw scrollbar offset issue */
.slider-bleed,
#mainSlider,
#slidesTrack,
.slide {
    width: 100%;
    /* use 100% of parent instead of 100vw */
    max-width: 100%;
    margin: 0 auto;
    left: 0 !important;
    transform: none !important;
    /* cancel translateX(-50%) overflow */
    box-sizing: border-box;
    overflow: hidden;
}

/* Ensure no body scrollbars from slider */
body {
    overflow-x: hidden !important;
}
/* ====== Store Owner Login: smaller + nudged to the right ====== */
/* (Override, safe to add at end of styles.css) */

.header-inner {
  display: grid !important;
  grid-template-columns: auto 1fr auto !important;
  align-items: center;
  gap: 16px;
  padding: 14px 50px;
}

.header-search {
  justify-self: center;
  width: 100%;
  max-width: 540px;
}

.header-inner a.btn[href$="Store_login.html"] {
  justify-self: end;
  padding: 8px 14px !important;
  font-size: 14px !important;
  border-radius: 28px !important;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12) !important;
  min-width: 0;
  height: auto;
  line-height: 1;
}

.brand img {
  height: 46px;
}

@media (max-width: 720px) {
  .header-inner {
    grid-template-columns: 1fr !important;
    padding: 10px 12px !important;
  }
  .header-search {
    justify-self: stretch;
    max-width: none;
    order: 3;
  }
  .header-inner a.btn[href$="Store_login.html"] {
    /* justify-self: auto; */
        width: max-content;
        padding: 10px 12px !important;
        /* margin-top: 8px; */
        position: absolute;
        top: 17px;
  }
  
}
/* offer display*/
/* ===== Offerta — center heading, 5-per-row, smaller images, stable cards ===== */

/* center the section heading and subtitle */
.section-heading, .offers-header, .top-offers-title {
  text-align: center !important;
  margin-left: auto;
  margin-right: auto;
}

/* keep page centered and give room for 5 cards */
.page-wrapper {
  max-width: 1500px;
  margin: 0 auto;
  padding: 20px 18px;
  box-sizing: border-box;
}

/* force grid to auto-fit but prefer 5 columns on large screens */
.grid {
  display: grid;
  gap: 18px;
  margin-top: 20px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* prefer EXACT 5 columns on wide screens */
@media (min-width: 1400px) {
  .grid { grid-template-columns: repeat(5, 1fr); }
}

/* 4 cols on medium-large screens */
@media (min-width: 1100px) and (max-width: 1399px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

/* 3 cols tablet */
@media (min-width: 700px) and (max-width: 1099px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}

/* 2 cols mobile */
@media (max-width: 699px) {
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* card layout and smaller image area so cards are slimmer */
.offer-card {
  display: flex;
  flex-direction: column;
  min-height: 300px;
  border-radius: 10px;
  overflow: hidden;
  box-sizing: border-box;
}

/* reduce image height (tighter) and keep aspect */
.offer-image {
  width: 100%;
  aspect-ratio: 3 / 2; /* slightly shorter than previous 4/3 */
  overflow: hidden;
  background: #f6f6f6;
  border-radius: 10px 10px 0 0;
}

/* ensure all images fill container and will not distort or leave empty bars */
.offer-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background-color: #f6f6f6;
}

/* tighten title/body spacing */
.offer-body {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
}

/* avoid horizontal scroll from somewhere else */
html, body { overflow-x: hidden; }

/* small visual tweak for ultra-wide screens */
@media (min-width: 1800px) {
  .page-wrapper { padding-left: 12px; padding-right: 12px; }
}
/* ===== Offerta — remove left white space, keep centered layout ===== */

/* Ensure wrapper fills screen width on wide view */
.page-wrapper,
.slider-bleed,
.main,
.offers-section {
    width: 100%;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Force grid to hug both edges evenly */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    justify-content: center;
    /* keep center alignment */
    padding: 0 2%;
    /* gentle side breathing space */
    box-sizing: border-box;
}

/* Slightly reduce outer padding on mobile so content fits perfectly */
@media (max-width: 700px) {
    .grid {
        padding: 0 10px;
        gap: 12px;
    }
}
/* top offer title */
/* ===== Offerta — Center "Top Offers Near You" section with 1200px alignment ===== */

:root {
    --CONTENT-WIDTH: 1200px;
    /* matches header width */
    --SIDE-GAP: 18px;
}

/* Keep full-width section background, but center the internal content */
.offers-section,
.top-offers-wrapper,
.offers-container {
    width: 100%;
    box-sizing: border-box;
}

/* Center the heading & subtitle to align with header area */
.offers-section .section-heading,
.offers-section .top-offers-title,
.offers-section .offers-header,
.top-offers-title,
.offers-header {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: var(--CONTENT-WIDTH);
    padding-left: var(--SIDE-GAP);
    padding-right: var(--SIDE-GAP);
    box-sizing: border-box;
}

/* Grid container: centered + 5 columns on desktop */
.offers-section .grid,
.top-offers-wrapper .grid,
.offers-container .grid {
    display: grid;
    gap: 18px;
    margin: 20px auto 0;
    padding-left: var(--SIDE-GAP);
    padding-right: var(--SIDE-GAP);
    max-width: var(--CONTENT-WIDTH);
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    box-sizing: border-box;
}

/* 5 columns on large screens */
@media (min-width: 1400px) {

    .offers-section .grid,
    .top-offers-wrapper .grid,
    .offers-container .grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* 4 columns for medium desktops */
@media (min-width: 1100px) and (max-width: 1399px) {
    .offers-section .grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 3 columns for tablets */
@media (min-width: 700px) and (max-width: 1099px) {
    .offers-section .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 2 columns for mobiles */
@media (max-width: 699px) {
    .offers-section .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    :root {
        --SIDE-GAP: 12px;
    }
}

/* Card and image adjustments for balance */
.offers-section .offer-card {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    box-sizing: border-box;
    min-height: 300px;
}

.offers-section .offer-image {
    width: 100%;
    aspect-ratio: 3 / 2;
    /* slightly shorter images */
    overflow: hidden;
    border-radius: 10px 10px 0 0;
    background: #f6f6f6;
}

.offers-section .offer-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.offers-section .offer-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
}

html,
body {
    overflow-x: hidden;
}
/* OFFERTA — persistent forced layout (centered, 5-per-row, remove left gap) */
.offers-section,
.top-offers-wrapper,
.offers-container,
.offers,
.offers-area,
.section-offers,
.offers-section .offers-inner {
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

.offers-section .grid,
.offers .grid,
.top-offers .grid,
.offers-container .grid,
.section-offers .grid,
.offers-section .offers-inner .grid {
    max-width: 1200px !important;
    margin: 16px auto !important;
    padding: 0 18px !important;
    box-sizing: border-box !important;
    display: grid !important;
    gap: 18px !important;
    grid-template-columns: repeat(5, 1fr) !important;
    justify-items: stretch !important;
}

.offers-section .offer-card,
.grid .offer-card,
.offer-card {
    min-height: 300px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

.offers-section .offer-image,
.offer-image {
    width: 100% !important;
    aspect-ratio: 3/2 !important;
    overflow: hidden !important;
    border-radius: 10px 10px 0 0 !important;
    background: #f6f6f6 !important;
}

.offers-section .offer-image img,
.offer-image img,
img.offer-thumb {
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}

html,
body {
    overflow-x: hidden !important;
}

/* responsive fallbacks */
@media (max-width:1399px) {

    .offers-section .grid,
    .offers .grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width:1099px) {

    .offers-section .grid,
    .offers .grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width:699px) {

    .offers-section .grid,
    .offers .grid {
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 0 12px !important;
        gap: 12px !important;
    }
}
/* ================= Offerta Slider Section (Fixed + Responsive) ================= */
/* ===== Offerta slider functional layout fix ===== */
#mainSlider {
  overflow: hidden;
  width: 100%;
  position: relative;
  border-radius: 10px;
}

#slidesTrack {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  transition: transform 0.6s ease-in-out;
}

#slidesTrack .slide {
  flex: 0 0 100%;
  width: 100%;
  position: relative;
}

#slidesTrack img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

/* Responsive height */
@media (max-width: 900px) {
  #slidesTrack img { height: 340px; }
}
@media (max-width: 600px) {
  #slidesTrack img { height: 240px; }
}
/* screen size */
/* adaptive slider height (clamp: min, preferred, max) */
#slidesTrack img {
    height: clamp(260px, 28vw, 520px);
    /* grows with viewport but stays within limits */
    object-fit: cover;
}

/* allow 6 columns on ultra-wide screens */
@media (min-width: 1800px) {

    .offers-section .grid,
    .top-offers-wrapper .grid,
    .offers-container .grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 20px;
    }
}

/* optionally increase content width on very wide screens (center still controlled) */
@media (min-width: 2000px) {
    :root {
        --CONTENT-WIDTH: 1600px;
    }

    /* increases centered content cap for huge displays */
}
.ui-search-banner {
    background: #f0fff6;
    border: 1px solid #e0efe7;
    color: #0b6a44;
    border-radius: 6px;
    max-width: 1200px;
    margin: 12px auto;
    font-weight: 600;
}
/* addprodut/owner dashboard */
/* Header Container */
/* --- Header Layout --- */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #eee;
  padding: 10px 40px; /* keeps logo away from extreme left */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* --- Left: Offerta logo --- */
.header-left .brand img {
  height: 44px;
  width: auto;
}

/* --- Right: Owner info & buttons --- */
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Owner info (photo + name) */
.owner-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.owner-info img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ddd;
  background-color: #f4f4f4;
}

#shopName {
  font-weight: 600;
  color: #333;
  font-size: 16px;
}

/* --- Buttons --- */
/* --- Buttons (consistent sizing) --- */
.btn {
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  padding: 7px 18px; /* unified padding */
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 15px;
  line-height: 1;
}

/* Elegant outlined edit button */
.btn.outline-edit {
  border: 2px solid #2e7d32;
  background: transparent;
  color: #2e7d32;
}

.btn.outline-edit:hover {
  background: #2e7d32;
  color: #fff;
  transform: translateY(-1px);
}

/* Logout button (same size as edit) */
.btn.small.danger {
  border: 3px solid #006e4f;
  background-color: #006e4f;
  color: #fff;
}

.btn.small.danger:hover {
  background-color: #015c40;
  transform: translateY(-1px);
  opacity: 0.95;
}

/* --- Owner details (below header) --- */
.owner-details {
  display: flex;
  gap: 25px;
  margin: 8px 0 0 100px;
  color: #444;
  font-size: 14px;
}
/* ---- Modal compact & responsive improvements ---- */

/* Limit modal card height and make it scrollable */
.modal .card {
    max-height: calc(100vh - 40px);
    /* keeps some breathing room at top/bottom */
    overflow: hidden;
    /* hide global overflow, inner wrapper will scroll */
    display: flex;
    flex-direction: column;
    /* allow footer to be placed at bottom */
    padding: 12px;
    /* slightly reduced padding */
    gap: 8px;
    box-sizing: border-box;
}

/* inner scroll area for form content */
.modal .card .form-scroll {
    overflow-y: auto;
    padding-right: 8px;
    /* room for scroll bar */
    flex: 1 1 auto;
    /* take remaining space, allow scrolling */
}

/* Reduce vertical spacing for form groups */
.modal .card .form-group {
    margin-bottom: 8px;
    gap: 6px;
}

/* Make labels slightly smaller to save vertical space */
.modal .card label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 600;
}

/* Inputs slightly smaller too */
.modal .card .input,
.modal .card input[type="text"],
.modal .card input[type="number"],
.modal .card select,
.modal .card textarea {
    height: 36px;
    padding: 8px 10px;
    font-size: 14px;
    border-radius: 8px;
}

/* Compact expiry time fields inline */
.expiry-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.expiry-row .small-input {
    width: 54px;
    padding: 7px 8px;
    height: 34px;
}


.image-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 8px;
}

@media (max-width:420px) {
    .image-slots {
        grid-template-columns: repeat(2, 1fr);
    }
}

.image-slot {
    background: #fafafa;
    border: 1px dashed #eee;
    height: 64px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* 13-10-2025 */
/* Fix live/expired offers list layout: left-aligned body, right actions */
.offers-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 60vh;
  overflow: auto;
  padding: 8px;
  box-sizing: border-box;
}

/* Each row is a horizontal flex container */
.offer-row {
  display: flex !important;
  align-items: flex-start !important; /* allow multi-line body */
  justify-content: space-between !important;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  border: 1px solid #e9eef2;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
  box-sizing: border-box;
}

/* Body is column, left aligned, allowed to shrink */
.offer-body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  flex: 1 1 auto;
  min-width: 0; /* critical to allow truncation and proper flex behavior */
}

/* Title + meta + expiry */
.offer-title {
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 15px;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.offer-meta, .offer-expires {
  font-size: 13px;
  color: #6b7280;
  white-space: normal; /* allow wrap if needed */
  margin: 0;
}

/* Actions column (edit/delete) — stays at right */
.offer-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
  align-items: center;
}

/* Make sure buttons are visible and compact */
.offer-actions .btn.small {
  padding: 6px 10px;
  font-size: 13px;
}

/* Slight hover highlight */
.offer-row:hover {
  background: #fbfdff;
}
/* ======= Strong overrides for Live/Expired Offers layout ======= */
/* ===== Force-visible Live/Expired offer meta & expiry ===== */
#liveOffersList, #expiredOffersList, .offers-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    padding: 8px !important;
    box-sizing: border-box !important;
    max-height: 60vh !important;
    overflow: auto !important;
}

/* Offer row layout */
.offer-row {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 12px 14px !important;
    margin: 6px 0 !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    border: 1px solid #e9eef2 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03) !important;
    text-align: left !important;
    box-sizing: border-box !important;
}

/* Body: allow wrapping, left alignment, shrink correctly */
.offer-body {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    text-align: left !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

/* Ensure title visible and truncated if long */
.offer-title {
    font-weight: 700 !important;
    font-size: 15px !important;
    margin-bottom: 6px !important;
    color: #111827 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
}

/* FORCE meta & expiry to be visible (this fixes hidden/invisible rules) */
.offer-meta,
.offer-expires {
    display: block !important;
    color: #6b7280 !important;
    font-size: 13px !important;
    opacity: 1 !important;
    height: auto !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    padding: 0 !important;
    visibility: visible !important;
}

/* Actions column */
.offer-actions {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    flex: 0 0 auto !important;
}

/* small visual nicety */
.offer-row:hover {
    background: #fbfdff !important;
}
/* ===== Ensure Edit/Delete are visible on offer rows ===== */
.offer-row {
    position: relative !important;
    overflow: visible !important; /* allow children (buttons) to be visible */
}

/* Action column stays on the right and never collapses */
.offer-actions {
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    justify-content: flex-end !important;
    flex: 0 0 auto !important;
    min-width: 96px !important; /* reserve room so buttons don't wrap */
}

/* Make sure modal container doesn't clip children */
.modal-content, .modal .modal-content {
    overflow: visible !important;
}

/* Make buttons stand out and not be invisible due to color/background */
.offer-actions .btn {
    z-index: 30 !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08) !important;
}

/* Defensive: if any global .card or .offer-row sets text-center, override here */
.offer-row, .offer-body {
    text-align: left !important;
}

/* When screen is small, allow actions to move next to body without collapsing */
@media (max-width: 520px) {
    .offer-actions {
        min-width: 72px !important;
        gap: 6px !important;
    }
}
/* --- Final Fix: Make Edit button text visible --- */
.offer-actions .btn.small {
    background: #ffffff !important;
    /* keep white background */
    color: #1a7f64 !important;
    /* dark green text for contrast */
    border: 1px solid #1a7f64 !important;
    font-weight: 600 !important;
    transition: background 0.2s ease, color 0.2s ease;
}

.offer-actions .btn.small:hover {
    background: #1a7f64 !important;
    color: #ffffff !important;
    /* invert on hover for clarity */
}
/* --- Uniform size for Edit & Delete buttons --- */
.offer-actions .btn.small {
    min-width: 90px !important;
    /* ensures both buttons same width */
    height: 36px !important;
    /* fixed uniform height */
    padding: 8px 0 !important;
    /* equal vertical spacing */
    text-align: center !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
}

/* Edit button (green outline) */
.offer-actions .btn.small:not(.danger) {
    background: #ffffff !important;
    color: #1a7f64 !important;
    border: 1.8px solid #1a7f64 !important;
    transition: all 0.2s ease;
}

/* Delete button (filled) */
.offer-actions .btn.small.danger {
    background: #1a7f64 !important;
    color: #ffffff !important;
    border: 1.8px solid #1a7f64 !important;
    transition: all 0.2s ease;
}

/* Hover effects */
.offer-actions .btn.small:not(.danger):hover {
    background: #1a7f64 !important;
    color: #ffffff !important;
}

.offer-actions .btn.small.danger:hover {
    background: #176c56 !important;
    border-color: #176c56 !important;
}

/* === Offerta footer + fixed app badges (final) === */

/* ==== CLEAN FIX: badges fixed at bottom, footer reaches them (no overlap / no gap) ==== */

/* 1) Make sure badges are fixed at the bottom and not translated */
.app-badges-fixed {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 48px !important;         /* bar height */
  padding: 4px 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  background: #fff !important;
  border-top: 1px solid #e9eef2 !important;
  z-index: 9999 !important;
  box-sizing: border-box !important;
  transform: none !important;      /* undo any translateY */
}

/* badge images */
.app-badges-fixed img {
  height: 34px !important;
  width: auto !important;
  margin: 0 6px !important;
}

/* 2) Make footer visually extend down so its background touches badge bar
   (48px bar + 8px breathing = 56px). This prevents overlap and removes gap. */
footer,
.footer {
  margin-bottom: 0 !important;
  padding-bottom: 98px !important; /* 56 + 42 = 98px total */
  box-sizing: border-box !important;
  background: #fafafa !important;
}

/* 3) Remove any previous global html/body bottom padding (we're using footer padding now) */
html, body {
  padding-bottom: 0 !important;
}

/* 4) Defensive: hide tiny spacer nodes immediately before badges if present */
footer + .app-badges-fixed,
.footer + .app-badges-fixed,
footer + div.app-badges-fixed {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* mobile tweaks keep proportional spacing */
@media (max-width: 640px) {
  .app-badges-fixed { height: 44px !important; padding: 3px 0 !important; }
  .app-badges-fixed img { height: 30px !important; }
  footer, .footer { padding-bottom: 52px !important; }
}
/* Add Product modal — Live Offers style */
.modal { position:fixed; inset:0; display:none; align-items:center; justify-content:center; background:rgba(15,23,42,0.45); z-index:1200; }
.modal.show { display:flex; }
.modal-card { width:520px; max-width:96vw; max-height:82vh; background:#fff; border-radius:12px; box-shadow:0 10px 30px rgba(2,6,23,0.18); display:flex; flex-direction:column; overflow:visible; }
.modal-header { display:flex; align-items:center; justify-content:space-between; padding:14px 18px; border-bottom:1px solid #eef2f6; }
.modal-header h3 { margin:0; font-size:1.05rem; font-weight:700; color:#0f1724; }
.close-modal { background:transparent; border:0; font-size:20px; cursor:pointer; color:#6b7280; padding:6px; }

/* scrollable body */
.modal-body { padding:12px 18px; overflow:auto; flex:1 1 auto; }

/* form layout */
.form-card { display:flex; flex-direction:column; gap:12px; }
.form-group { display:flex; flex-direction:column; gap:6px; }
.form-control { padding:10px 12px; border:1px solid #e6eef2; border-radius:8px; background:#fff; font-size:14px; color:#111827; box-sizing:border-box; }
.form-control:focus { outline:none; box-shadow:0 0 0 3px rgba(14,165,164,0.08); border-color:#0ea5a4; }

/* grid two columns */
.grid-two { display:grid; grid-template-columns:1fr 1fr; gap:8px; }

/* time controls */
.time-controls { display:flex; gap:8px; align-items:center; }
.time-select { padding:8px 10px; border-radius:8px; border:1px solid #e6eef2; background:#fff; min-width:60px; text-align:center; }

/* image slots */
.image-grid { display:flex; gap:10px; margin-top:6px; }
.image-slot { width:68px; height:68px; border-radius:8px; border:2px dashed #eceff2; display:flex; align-items:center; justify-content:center; cursor:pointer; background:#fbfdff; position:relative; overflow:hidden; }
.image-slot .add-icon { font-size:22px; color:#94a3b8; user-select:none; }
.image-slot input[type="file"] { position:absolute; inset:0; opacity:0; width:100%; height:100%; cursor:pointer; }
.image-slot .slot-preview { display:block; width:100%; height:100%; object-fit:cover; }

/* muted small text */
.muted { color:#6b7280; font-size:13px; }

/* footer actions (buttons) */
.form-actions { display:flex; gap:12px; justify-content:flex-end; padding-top:8px; border-top: none; }
.btn.small { min-width:96px; height:36px; padding:8px 12px; border-radius:8px; font-weight:600; font-size:14px; cursor:pointer; box-sizing:border-box; }
.btn.small.outline { background:#fff; color:#0f6f56; border:1.8px solid #0f6f56; box-shadow:0 4px 10px rgba(0,0,0,0.04); }
.btn.small.primary { background:#0f6f56; color:#fff; border:1.8px solid #0f6f56; box-shadow:0 6px 14px rgba(14,110,87,0.12); }

/* responsive */
@media (max-width:520px) {
  .modal-card { width:92vw; max-height:92vh; border-radius:10px; }
  .grid-two { grid-template-columns:1fr; }
  .image-slot { width:58px; height:58px; }
  .btn.small { min-width:84px; }
}
/* Minimal floating close button */
.close-modal {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.04);
  color: #555;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 0;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.close-modal:hover {
  background: #0f6f56;
  color: #fff;
  transform: scale(1.1);
}
/* --- Popover style for Edit Company modal (anchor under Edit button) --- */
/* === Compact Edit Company modal — compact + elegant close only === */

/* Make the popover narrower and tighter */
#editCompanyModal .modal-content {
    width: 320px !important;
    /* compact width */
    max-width: calc(100vw - 24px) !important;
    padding: 10px 12px !important;
    /* reduced padding */
    border-radius: 10px !important;
    box-shadow: 0 8px 26px rgba(2, 6, 23, 0.14) !important;
}

/* header smaller */
#editCompanyModal .modal-header,
#editCompanyModal h2,
#editCompanyModal .modal-content>h2 {
    padding: 10px 8px !important;
}

#editCompanyModal h2,
#editCompanyModal .modal-header h3 {
    font-size: 16px !important;
    margin: 0;
    font-weight: 700;
    color: #0f1724;
}

/* reduce vertical spacing in form */
#editCompanyModal .modal-body,
#editCompanyModal .form-card {
    padding: 8px 8px 10px 8px !important;
    gap: 8px !important;
}

#editCompanyModal .form-group {
    gap: 6px;
    margin-bottom: 6px;
}

/* smaller inputs */
#editCompanyModal .input,
#editCompanyModal .form-control {
    padding: 8px 10px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
}

/* grid two compact */
#editCompanyModal .grid-two {
    gap: 8px;
    grid-template-columns: 1fr 1fr;
}

/* shrink image preview */
#editCompanyModal #shopPhotoPreview {
    max-width: 96px !important;
    max-height: 72px !important;
    border-radius: 6px !important;
    margin-top: 6px !important;
}

/* compact action row: keep only Save button visible */
#editCompanyModal .form-actions {
    padding-top: 8px !important;
    gap: 8px !important;
    justify-content: flex-end !important;
}

/* make the Save button compact & consistent */
#editCompanyModal .btn.brand,
#editCompanyModal .btn.small.primary,
#editCompanyModal .btn.small {
    min-width: 88px !important;
    height: 34px !important;
    padding: 6px 12px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
}

/* Elegant close (×) — floating inside top-right corner */
/* Compact, polished edit-company popover */
#editCompanyModal .modal-content {
    width: 300px !important;
    /* slightly narrower */
    max-width: calc(100vw - 24px) !important;
    padding: 10px !important;
    border-radius: 10px !important;
    box-shadow: 0 6px 20px rgba(2, 6, 23, 0.12) !important;
    background: #fff !important;
    color: #0f1724 !important;
    font-size: 14px;
    line-height: 1.25;
}

/* header + title */
#editCompanyModal h2 {
    margin: 0 40px 8px 0;
    font-size: 15px;
    font-weight: 700;
    padding-left: 6px;
}

#editCompanyModal .modal-header {
    padding: 6px 10px 0 8px;
}

/* reduce inter-field spacing */
#editCompanyModal .form-card,
#editCompanyModal .modal-body {
    gap: 8px !important;
    padding: 6px 8px 10px 8px !important;
}

#editCompanyModal .form-group {
    gap: 6px;
    margin-bottom: 6px;
}

/* smaller inputs */
#editCompanyModal .input,
#editCompanyModal .form-control {
    padding: 8px 10px !important;
    font-size: 14px;
    border-radius: 8px;
}

/* shrink photo preview */
#editCompanyModal #shopPhotoPreview {
    max-width: 88px !important;
    max-height: 64px !important;
    border-radius: 6px !important;
    margin-top: 6px !important;
}

/* compact actions: hide default Cancel visually, keep single Save button */
#editCompanyModal .form-actions {
    gap: 8px;
    padding-top: 6px;
    justify-content: flex-end;
}

/* Save button style */
#editCompanyModal #saveCompanyBtn {
    min-width: 88px;
    height: 34px;
    padding: 6px 12px;
    border-radius: 8px;
    background: #0f6f56;
    color: #fff;
    border: 1px solid #0f6f56;
    box-shadow: 0 6px 14px rgba(14, 110, 87, 0.12);
}

/* Elegant X: floating inside top-right corner */
#editCompanyModal .modal-content .close-modal {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #374151;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(2, 6, 23, 0.07);
}

#editCompanyModal .modal-content .close-modal:hover {
    background: #0f6f56;
    color: #fff;
    transform: scale(1.05);
}

/* small screens - full width-ish */
@media (max-width:520px) {
    #editCompanyModal .modal-content {
        width: 92vw !important;
        left: 8px !important;
        right: 8px !important;
    }

    #editCompanyModal #saveCompanyBtn {
        min-width: 84px;
    }
}
.offers-grid,
#liveOffersGrid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.offer-card {
    width: 220px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(12, 18, 24, 0.06);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.offer-card-image img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.offer-card-body {
    padding: 12px;
}

.offer-card-title {
    font-weight: 600;
    margin: 0 0 4px 0;
}

.offer-card-store {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 6px;
}

.price-current {
    color: #0f5132;
    font-weight: 700;
}

.price-old {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 0.9rem;
}

.offer-card-expiry {
    font-size: 0.8rem;
    color: #6b7280;
}

.offer-card-edit {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #eaf7ef;
    border: none;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
}

@media (max-width: 768px) {
    .offer-card {
        width: 45%;
    }
}

@media (max-width: 480px) {
    .offer-card {
        width: 100%;
    }
}
/* --- Add New Offer Button placement under logo --- */
/* --- Center Add New Offer and tighten spacing --- */
.action-bar-centered {
    display: flex;
    justify-content: center;
    margin: 6px 0 6px 0;
}

/* tighter spacing between button and offers */
.live-offers-panel {
    margin-top: 12px !important;
}

/* ensure everything stays centered and no overflow */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 60px;
    overflow-x: hidden;
}

/* mobile refinement */
@media (max-width: 640px) {
    .action-bar-centered {
        margin: 6px 0 2px 0;
    }

    .action-btn.brand {
        padding: 8px 14px;
        font-size: 0.95rem;
    }

    .offers-grid {
        gap: 10px;
    }
}

/* ===== Offerta offers layout — responsive, fill width gracefully ===== */
.main {
    max-width: 1300px;
    margin: 0 auto;
    padding: 6px 18px 60px;
    box-sizing: border-box;
    overflow-x: hidden;
}

.panel {
    width: 100%;
    margin: 6px auto 18px;
    box-sizing: border-box;
    padding: 0 8px;
}

.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    align-items: start;
    justify-items: stretch;
    padding: 6px 6px;
    box-sizing: border-box;
    max-width: 1200px;
    margin: 0 auto;
}

.offers-grid .card,
.offers-grid .card-media,
.offers-grid .card-body {
    width: 100%;
    box-sizing: border-box;
}

.card {
    width: auto !important;
    max-width: 100%;
}

.card-media img,
.card img {
    height: 140px;
    object-fit: cover;
}

body,
html {
    overflow-x: hidden;
}

@media (min-width: 1400px) {
    .main {
        max-width: 1400px;
    }

    .offers-grid {
        max-width: 1280px;
    }
}

@media (max-width: 640px) {
    .main {
        padding-top: 6px;
    }

    .offers-grid {
        gap: 10px;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .card-media img {
        height: 110px;
    }
}
/* ---------------------
   Single-scrollbar fix
   --------------------- */

/* ensure page is the primary scroller */
html,
body {
    height: 100%;
    overflow-y: auto;
    /* let page handle vertical scrolling */
    -webkit-overflow-scrolling: touch;
}

/* try to prevent nested containers from forcing their own scrollbars */
.sidebar,
.modal,
.offers-list,
#liveOffersGrid,
#expiredOffersGrid,
.owner-details,
.app-badges-fixed {
    /* allow content to expand; let the page scroll instead of these */
    max-height: none !important;
    overflow-y: visible !important;
}

/* keep long lists visually scrollable inside page, but remove local scrollbars */
.offers-list,
#existingProducts {
    overflow: visible !important;
}

/* ensure the main area is tall enough so page scroll is used */
.main {
    min-height: calc(100vh - 140px);
    box-sizing: border-box;
}

/* small cosmetic: unify scrollbars (webkit browsers) so it looks consistent */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}
/* ===== Option B: Left-align grid under the Add button ===== */

.main {
    max-width: 1600px;
    margin: 0 auto;
    padding: 8px 20px 60px;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* keep the Add button on the left */
.action-bar-centered {
    display: flex;
    justify-content: flex-start;
    /* left aligned */
    margin: 6px 0 6px 18px;
    /* aligns with header/brand */
}

/* grid that starts from left and fills to right */
.offers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 18px;
    align-items: start;
    justify-items: stretch;
    width: 100%;
    max-width: none;
    margin: 0 0 0 18px;
    /* align with Add button */
    padding: 6px;
    box-sizing: border-box;
}

/* make cards fill grid column */
.offers-grid .card {
    width: 100%;
    max-width: 100%;
}

/* consistent card image size */
.card-media img,
.card img {
    height: 140px;
    object-fit: cover;
}

/* tighten spacing between Add button and offers section */
.live-offers-panel {
    margin-top: 10px !important;
}

/* remove stray horizontal scrollbars */
html,
body {
    overflow-x: hidden;
}

/* --- mobile adjustments --- */
@media (max-width: 640px) {
    .action-bar-centered {
        margin-left: 12px;
    }

    .offers-grid {
        margin-left: 12px;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }

    .card-media img {
        height: 110px;
    }
}
/* --- Premium Add New Offer Button --- */
.action-btn.brand {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  border: none;
  padding: 12px 26px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow:
    0 4px 10px rgba(79, 70, 229, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

/* subtle glass reflection overlay */
.action-btn.brand::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0.4) 0%,
    rgba(255, 255, 255, 0.1) 100%
  );
  transform: skewX(-25deg);
  transition: 0.6s;
}

/* Hover — smooth glow and slide reflection */
.action-btn.brand:hover {
  box-shadow:
    0 6px 18px rgba(79, 70, 229, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.action-btn.brand:hover::before {
  left: 125%;
}

.action-btn.brand:active {
  transform: translateY(0);
  box-shadow:
    0 2px 6px rgba(79, 70, 229, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Icon animation */
.action-btn.brand .icon {
  font-size: 1.2rem;
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 0.9;
}
.action-btn.brand:hover .icon {
  transform: rotate(90deg) scale(1.1);
  opacity: 1;
}
/* Delete / danger button */
.btn.danger {
  background: #fff3f2;
  color: #b91c1c;
  border: 1px solid rgba(185,28,28,0.08);
}
.btn.danger:hover {
  background: #fee2e2;
  box-shadow: 0 6px 18px rgba(220,38,38,0.06);
}
.home_sec3 h2, .home_sec3 p{
    text-align: center;

}
.home_sec3 .grid {
    display: flex !important;
        flex-wrap: wrap !important; 
    
}
.grid {
    max-width: 1280px !important;
}
:root {
    --brand: #0f6a4f;
    /* primary green */
    --brand-2: #0a4d3a;
    /* darker */
    --muted: #f1f5f9;
    /* light bg */
    --ring: rgba(15, 106, 79, .15);
    /* focus ring */
    --danger: #c0362c;
}
/* Anchor the menu to the owner button wrapper */
#ownerArea {
    position: relative;
}

/* If you don't have a .relative utility (e.g., no Tailwind), keep this too */
.relative {
    position: relative;
}

/* Dropdown: sit right under the button, aligned to the right edge */
.owner-session #ownerMenu {
    position: absolute;
    top: calc(100% + 8px);
    /* 8px gap below the chip */
    right: 0;
    /* align menu's right edge with button's right edge */
    min-width: 200px;
    background: #fff;
    border: 1px solid #e6e8ec;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
    padding: 6px;
    z-index: 1000;
}

/* Optional: animation and hover states */
.owner-session #ownerMenu {
    animation: fadeIn .12s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.owner-session .dropdown-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: .6rem .8rem;
    border-radius: 10px;
    font-weight: 600;
    color: #0f172a;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.owner-session .dropdown-item:hover {
    background: #f1f5f9;
}

.owner-session .dropdown-item.danger {
    color: #c0362c;
}

.owner-session .dropdown-item.danger:hover {
    background: #fff4f3;
}

/* Chip basics (if not already styled elsewhere) */
.owner-session .chip {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem .8rem;
    border-radius: 999px;
    background: #0f6a4f;
    color: #fff;
    border: none;
    box-shadow: 0 6px 16px rgba(15, 106, 79, .18);
    cursor: pointer;
}

.owner-session .chip:hover {
    background: #0a4d3a;
}

.owner-session .chip .chip-caret {
    opacity: .9;
}

