/* ================================================================
   assets/css/catalog.css
   Shared product-grid / catalog-listing styling.
   Previously this whole block was pasted, byte-for-byte, into the
   <style> tag of bedroom.php, living_room.php, dining_room.php,
   tables_and_consoles.php and decorations_and_accessories.php.
   Now it is loaded once via config/site_css_links.php.
   ================================================================ */

/* Category hero banner */
.category-hero-banner {
    background-size: cover;
    background-position: center;
    padding: 55px 15px;
    color: #ffffff;
    text-align: center;
}
.category-hero-banner h1 {
    font-weight: 800;
    font-size: calc(1.5rem + 1vw);
    margin-bottom: 10px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.category-hero-banner p {
    font-size: 1rem;
    max-width: 640px;
    margin: 0 auto;
    text-shadow: 0 1px 4px rgba(0,0,0,0.35);
}

/* Category chip nav */
.category-chip-row { padding: 16px 0; border-bottom: 1px solid var(--grid-border, #e8e8e8); }
.category-chip {
    padding: 7px 16px;
    border: 1px solid #1a1a1a;
    border-radius: 20px;
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.82rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.category-chip:hover { background: var(--accent-gold); border-color: var(--accent-gold); color: #ffffff; }
.category-chip.active { background: #1a1a1a; color: #ffffff; border-color: #1a1a1a; }

/* Toolbar */
.catalog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    background: #ffffff;
    border-bottom: 1px solid var(--grid-border, #e8e8e8);
    font-size: 0.9rem;
    color: #555555;
    flex-wrap: wrap;
    gap: 10px;
}
.catalog-toolbar .total-count { font-weight: 500; color: #444444; }
.catalog-toolbar .filter-controls { display: flex; align-items: center; gap: 16px; }
.sort-select-wrapper { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.sort-select {
    border: none; background: transparent; font-size: 0.88rem; color: #444444;
    font-weight: 500; cursor: pointer; outline: none; padding-right: 15px;
}
.view-layout-btns { display: flex; align-items: center; gap: 8px; }
.view-btn { background: transparent; border: none; color: #aaaaaa; cursor: pointer; font-size: 1.1rem; padding: 0 4px; transition: color 0.2s; }
.view-btn.active, .view-btn:hover { color: #333333; }

/* Grid container */
.catalog-grid-wrapper {
    border-top: 1px solid var(--grid-border, #e8e8e8);
    border-left: 1px solid var(--grid-border, #e8e8e8);
    border-right: 1px solid var(--grid-border, #e8e8e8);
    background: #ffffff;
}

/* Product card */
.product-grid-card {
    background: #ffffff;
    border-right: 1px solid var(--grid-border, #e8e8e8);
    border-bottom: 1px solid var(--grid-border, #e8e8e8);
    padding: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: background-color 0.2s ease;
}
html[dir="rtl"] .product-grid-card { border-right: none; border-left: 1px solid var(--grid-border, #e8e8e8); }
.product-grid-card:hover { background-color: #fcfcfc; }

.card-img-container {
    position: relative; width: 100%; aspect-ratio: 1.1 / 1; overflow: hidden;
    background-color: #ffffff; margin-bottom: 14px; display: flex; align-items: center; justify-content: center;
}
.card-img-container img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.4s ease; }
.product-grid-card:hover .card-img-container img { transform: scale(1.02); }

.badge-sale-tag {
    position: absolute; top: 0; left: 0; background-color: var(--sale-red, #d9383a); color: #ffffff;
    font-size: 0.68rem; font-weight: 800; letter-spacing: 0.5px; padding: 3px 6px; text-transform: uppercase; z-index: 3;
}
html[dir="rtl"] .badge-sale-tag { left: auto; right: 0; }

.promo-gift-overlay {
    position: absolute; bottom: 0; right: 0; width: 55%; z-index: 2; pointer-events: none;
    background: rgba(255,255,255,0.92); padding: 4px; border-radius: 4px 0 0 0; text-align: right; line-height: 1.1;
}
html[dir="rtl"] .promo-gift-overlay { right: auto; left: 0; text-align: left; border-radius: 0 4px 0 0; }
.promo-gift-title { color: var(--orange-promo, #e86424); font-weight: 900; font-size: 1.1rem; display: block; }
.promo-gift-sub { color: #333333; font-size: 0.7rem; font-weight: 700; display: block; }

.card-hover-actions {
    position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; opacity: 0; transition: all 0.25s ease; z-index: 4;
}
.product-grid-card:hover .card-hover-actions { opacity: 1; top: 10px; }
.quick-cart-trigger, .quick-view-trigger {
    width: 36px; height: 36px;
    background-color: #555555; color: #ffffff; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    border: none; cursor: pointer; box-shadow: 0 3px 8px rgba(0,0,0,0.15); transition: background-color 0.2s ease;
}
.quick-cart-trigger:hover, .quick-view-trigger:hover { background-color: #000000; }

.card-product-title {
    font-size: 0.92rem; font-weight: 600; color: #333333; margin-bottom: 4px; line-height: 1.35;
    text-decoration: none; display: block;
}
.card-product-title:hover { color: var(--accent-gold); }
.card-brand-subtitle { font-size: 0.78rem; color: #888888; margin-bottom: 10px; display: block; }

.card-price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font-size: 0.95rem; margin-bottom: 6px; }
.current-price { font-weight: 700; color: #111111; }
.old-price { text-decoration: line-through; color: #888888; font-size: 0.85rem; }
.save-price-text { color: var(--save-red, #d9383a); font-size: 0.82rem; font-weight: 600; }

.card-status-text { font-size: 0.78rem; margin-top: 4px; }
.status-delivery { color: var(--save-red, #d9383a); }
.status-stock { color: var(--stock-green, #108043); font-weight: 500; }

.color-swatches-row { display: flex; align-items: center; gap: 5px; margin-top: 6px; margin-bottom: 4px; }
.swatch-dot { width: 14px; height: 14px; border-radius: 2px; display: inline-block; border: 1px solid rgba(0,0,0,0.15); }
.swatch-more-cnt { font-size: 0.72rem; color: #666666; margin-left: 3px; }

.catalog-pagination { display: flex; justify-content: center; margin-top: 35px; margin-bottom: 20px; }
.pagination .page-link { color: #333333; border-color: #e5e5e5; padding: 8px 16px; font-weight: 600; }
.pagination .page-item.active .page-link { background-color: #1a1a1a; border-color: #1a1a1a; color: #ffffff; }

.floating-widget-btn {
    position: fixed; bottom: 20px; z-index: 99; background: #d3b38c; color: #ffffff; padding: 8px 18px;
    border-radius: 20px; font-weight: 600; font-size: 0.82rem; box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    border: none; cursor: pointer; text-decoration: none; display: flex; align-items: center; gap: 6px;
}
.widget-rewards { left: 20px; }
.widget-chat { right: 20px; }
html[dir="rtl"] .widget-rewards { left: auto; right: 20px; }
html[dir="rtl"] .widget-chat { right: auto; left: 20px; }

@media (max-width: 768px) {
    .product-grid-card { padding: 12px; }
    .card-product-title { font-size: 0.85rem; }
}

/* ================================================================
   Homepage: hero carousel + category tiles + promo strip
   (Big-box furniture retailer layout, in the spirit of
   panhomestores.com / large GCC furniture chains)
   ================================================================ */
.home-hero { position: relative; overflow: hidden; }
.home-hero .carousel-item {
    height: 62vh; min-height: 380px; max-height: 640px;
    background-size: cover; background-position: center;
    display: flex; align-items: center;
}
.home-hero .hero-caption {
    color: #ffffff; text-align: start; max-width: 560px;
    background: rgba(0,0,0,0.28); padding: 28px 34px; border-radius: 4px;
}
.home-hero .hero-caption .hero-eyebrow {
    letter-spacing: 2px; text-transform: uppercase; font-size: 0.78rem; font-weight: 700; color: var(--accent-gold);
}
.home-hero .hero-caption h2 { font-weight: 800; font-size: calc(1.7rem + 1.2vw); margin: 8px 0 14px; text-shadow: 0 2px 8px rgba(0,0,0,0.35); }
.home-hero .hero-caption .btn-hero { background: #ffffff; color: #1a1a1a; font-weight: 700; padding: 10px 26px; border-radius: 2px; }
.home-hero .hero-caption .btn-hero:hover { background: var(--accent-gold); color: #ffffff; }

.shop-by-category { padding: 55px 0 15px; }
.shop-by-category .section-title { font-weight: 800; font-size: 1.6rem; margin-bottom: 6px; }
.shop-by-category .section-subtitle { color: var(--text-muted, #777); margin-bottom: 30px; }
.cat-tile {
    position: relative; display: block; border-radius: 4px; overflow: hidden; text-decoration: none;
    aspect-ratio: 1/1; background-size: cover; background-position: center;
}
.cat-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.55) 100%); }
.cat-tile span {
    position: absolute; left: 0; right: 0; bottom: 14px; z-index: 2; text-align: center;
    color: #ffffff; font-weight: 700; font-size: 0.95rem; letter-spacing: 0.3px;
}
.cat-tile:hover img, .cat-tile:hover { filter: brightness(1.05); }
.cat-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.cat-tile:hover img { transform: scale(1.06); }

.promo-strip { background: var(--top-bar-bg, #8c6258); color: #fff; padding: 14px 0; }
.promo-strip .promo-item { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 0.85rem; font-weight: 600; }
.promo-strip .promo-item i { font-size: 1.1rem; color: var(--accent-gold); }

.deals-section { padding: 50px 0; }

.brand-strip { padding: 30px 0; border-top: 1px solid var(--border-color, #eee); border-bottom: 1px solid var(--border-color, #eee); }
.brand-strip img { max-height: 34px; opacity: 0.55; filter: grayscale(100%); transition: opacity 0.2s; }
.brand-strip img:hover { opacity: 1; }

/* ================================================================
   Product Detail Page (product.php)
   ================================================================ */
.pdp-breadcrumb { font-size: 0.82rem; color: var(--text-muted, #777); padding: 14px 0; }
.pdp-breadcrumb a { color: var(--text-muted, #777); text-decoration: none; }
.pdp-breadcrumb a:hover { color: #1a1a1a; }

.pdp-gallery-main {
    width: 100%; aspect-ratio: 1/1; background: var(--bg-light, #f9f9f9);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
    border: 1px solid var(--border-color, #eee); border-radius: 4px; position: relative;
}
.pdp-gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.pdp-gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.pdp-thumb {
    width: 70px; height: 70px; border: 2px solid var(--border-color, #eee); border-radius: 4px;
    overflow: hidden; cursor: pointer; background: var(--bg-light, #f9f9f9); padding: 0;
}
.pdp-thumb img { width: 100%; height: 100%; object-fit: contain; }
.pdp-thumb.active { border-color: #1a1a1a; }

.pdp-sku { font-size: 0.8rem; color: var(--text-muted, #777); }
.pdp-title { font-size: 1.6rem; font-weight: 800; color: #1a1a1a; margin: 6px 0 4px; }
.pdp-brand { font-size: 0.9rem; color: var(--text-muted, #777); margin-bottom: 14px; display: block; }
.pdp-price-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.pdp-current-price { font-size: 1.9rem; font-weight: 800; color: #111; }
.pdp-old-price { text-decoration: line-through; color: #999; font-size: 1.15rem; }
.pdp-save-badge { background: var(--save-red, #d9383a); color: #fff; font-size: 0.78rem; font-weight: 700; padding: 3px 10px; border-radius: 3px; }

.pdp-status-line { font-size: 0.9rem; margin-bottom: 18px; }
.pdp-colors { display: flex; align-items: center; gap: 8px; margin: 16px 0; }
.pdp-swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; outline: 1px solid #ddd; cursor: pointer; }
.pdp-swatch.active { outline: 2px solid #1a1a1a; }

.pdp-qty-cart-row { display: flex; align-items: center; gap: 14px; margin: 22px 0; flex-wrap: wrap; }
.pdp-add-cart-btn {
    background: #1a1a1a; color: #fff; border: none; padding: 13px 34px; font-weight: 700;
    border-radius: 2px; font-size: 1rem; display: inline-flex; align-items: center; gap: 10px; transition: background .2s;
}
.pdp-add-cart-btn:hover { background: var(--accent-gold, #c5a059); color: #fff; }
.pdp-wishlist-btn {
    background: #fff; border: 1px solid #ccc; color: #1a1a1a; width: 48px; height: 48px; border-radius: 2px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.pdp-wishlist-btn:hover { border-color: #1a1a1a; }

.pdp-perk-list { border-top: 1px solid var(--border-color, #eee); margin-top: 20px; padding-top: 18px; }
.pdp-perk-list .perk-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; font-size: 0.88rem; color: #444; }
.pdp-perk-list .perk-row i { color: var(--accent-gold, #c5a059); margin-top: 3px; }

.pdp-tabs .nav-link { color: #555; font-weight: 600; border: none; border-bottom: 2px solid transparent; }
.pdp-tabs .nav-link.active { color: #1a1a1a; border-bottom-color: #1a1a1a; background: transparent; }
.pdp-tab-content { padding: 24px 4px; font-size: 0.95rem; color: #444; line-height: 1.7; }
.pdp-spec-table td { padding: 8px 6px; border-bottom: 1px solid var(--border-color, #eee); font-size: 0.9rem; }
.pdp-spec-table td:first-child { color: var(--text-muted, #777); width: 40%; }

.related-products-section { padding: 40px 0 10px; }

/* ================================================================
   Homepage: Installment / Buy Now Pay Later banner
   (below "Shop by Category" - a real promotional image supplied by
   the store, not a CSS-drawn mockup - see assets/promo/installment_banner.jpeg)
   ================================================================ */
.bnpl-banner { padding: 10px 0 30px; text-align: center; }
.bnpl-banner-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 14px;
}
