/* ══════════════════════════════════════════════════════════════════════════════
   CUSTOM FRONTEND STYLES (Extracted from Blade files)
   ══════════════════════════════════════════════════════════════════════════════ */

/* ── Reset & Base ── */
*,
*:before,
*:after {
    box-sizing: border-box !important;
}

html,
body {
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    position: relative;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main) !important;
    font-size: 1rem !important;
    line-height: 1.4;
    color: #1e293b;
    background: #f8fafc;
}

/* Reset all P tags in product cards */
.smhome-p-body p {
    margin: 0 !important;
    padding: 0 !important;
}

.smhome-p-body p:empty {
    display: none !important;
}

.smhome-p-short:empty {
    display: none !important;
}

.smhome-p-short {
    margin-top: -2px !important;
}

.smhome-p-price {
    margin-top: 0 !important;
}

/* Apply Button Colors Globally */
.smhome-p-order-btn,
.btn-primary,
.acct-signin,
.wish-item__add,
.cart-mini-qty,
.pdp__btn--buy,
.pdp__btn--cart,
.smp-atc-btn--active,
.smp-apply-btn,
.ofp-atc,
.cp-atc,
.cp-price-btn,
.newsletter__btn,
.acct-signup,
.na-atc,
.smhome-btn-reg,
.smhome-btn-sign,
.smp-cat-list a.active,
.ofp-chip.is-active,
.na-filter-chip.is-active,
.cp-sub-item.active {
    background-color: var(--btn-bg, #be0318) !important;
    color: var(--btn-text, #ffffff) !important;
    border: none !important;
    outline: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
}

.pdp__btn--cart {
    background-color: transparent !important;
    color: var(--btn-bg) !important;
    border: 2px solid var(--btn-bg) !important;
}

.smhome-p-order-btn:hover,
.pdp__btn--buy:hover,
.smp-atc-btn--active:hover,
.ofp-atc:hover,
.cp-atc:hover,
.newsletter__btn:hover,
.na-atc:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.smhome-ci {
    width: 100% !important;
}

/* Global Product Badges */
.smhome-p-badge,
.na-badge-new,
.na-badge-disc,
.smp-badge,
.ofp-badge {
    position: absolute !important;
    top: 10px !important;
    /* Removed global left: 10px to prevent stretching with right: 10px */
    background: #be0318 !important;
    background: var(--red, #be0318) !important;
    color: #fff !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    padding: 3px 10px !important;
    border-radius: 6px !important;
    z-index: 10 !important;
    width: auto !important;
    height: auto !important;
    display: inline-block !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

.smhome-p-badge,
.na-badge-new,
.smp-badge,
.ofp-badge {
    left: 10px !important;
}

.na-badge-disc,
.smp-badge-disc {
    left: auto !important;
    right: 10px !important;
    align-self: flex-start !important;
}

/* If both NEW and DISC exist and DISC should be next to NEW */
.na-badge-new+.na-badge-disc {
    left: 65px !important;
    right: auto !important;
}



.site-footer {
    background: var(--dark);
    margin-top: 60px;
    position: relative;
    overflow-x: hidden !important;
    max-width: 100% !important;
}

/* Section Headings */
.smhome-sec-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin: 12px 0 6px 0 !important;
    padding: 0 10px !important;
    flex-wrap: nowrap !important;
}

.smhome-sec-head h2 {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: #111827 !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    padding-left: 0 !important;
    white-space: nowrap !important;
    border-left: none !important;
}

.smhome-see-all {
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    color: var(--red) !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 2px !important;
    white-space: nowrap !important;
}

/* 1. Global Product Grid */
.smhome-prod-grid,
.smp-grid,
.ofp-grid,
.cp-prod-grid,
.na-grid {
    display: grid !important;
    gap: 12px !important;
    width: 100% !important;
    margin: 8px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

@media (max-width: 640px) {

    .smhome-prod-grid,
    .smp-grid,
    .ofp-grid,
    .cp-prod-grid,
    .na-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
}

/* 2. Product Card (Tight & Robust) */
.smhome-p-card,
.smp-card,
.ofp-card,
.cp-card,
.na-card {
    width: 100% !important;
    min-width: 0 !important;
    background: #fff !important;
    border: 1px solid #f1f3f7 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    transition: transform 0.2s ease !important;
    box-sizing: border-box !important;
}

/* 3. Image Container */
.smhome-p-img-wrap,
.smp-img-wrap,
.ofp-img-wrap,
.cp-img-wrap,
.na-img-wrap {
    width: 100% !important;
    background: #f8f9fb !important;
    overflow: hidden !important;
    position: relative !important;
}

@media (max-width: 991px) {

    .smhome-p-img-wrap,
    .smp-img-wrap,
    .ofp-img-wrap,
    .cp-img-wrap,
    .na-img-wrap,
    .sp-img-wrap,
    .sr-p-img-wrap,
    .chp-img-wrap,
    .pdp__rel-img-wrap {
        height: var(--p-img-h-mob) !important;
        aspect-ratio: auto !important;
    }
}

.smhome-p-img,
.smp-img,
.ofp-img,
.cp-img,
.na-img {
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}

/* 4. Body Content */
.smhome-p-body,
.smp-card-body,
.ofp-body,
.cp-card-body,
.na-body {
    padding: 8px !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.smhome-p-name {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: #111827 !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    min-height: auto !important;
    /* Remove fixed height */
    max-height: 40px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    white-space: normal !important;
}

.smhome-p-short {
    font-size: 0.85rem !important;
    color: #6b7280 !important;
    margin: 2px 0 6px 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.smhome-p-price {
    font-size: 1.15rem !important;
    font-weight: 900 !important;
    color: var(--red) !important;
    display: inline-block !important;
    margin: 0 !important;
    line-height: 1 !important;
}

.smhome-p-old {
    font-size: 0.75rem !important;
    color: #9ca3af !important;
    text-decoration: line-through !important;
    margin-left: 5px !important;
    display: inline-block !important;
}

/* 5. Meta & Button */
.smhome-p-meta {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: 4px !important;
    width: 100% !important;
}

.smhome-p-order-btn {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 12px 0 !important;
    margin-top: 8px !important;
    border-radius: 12px !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    border: 1.5px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 4px 15px rgba(190, 3, 24, 0.25) !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
}

.smhome-p-order-btn:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(190, 3, 24, 0.35) !important;
    background-color: var(--red-d, #a00d25) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}



/* 6. Dynamic Category Circles */
.smhome-circle-item {
    display: inline-block;
    text-align: center;
}

.smhome-circle-img {
    overflow: hidden !important;
    margin: 0 auto !important;
}

.smhome-circle-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 7. Tablet Optimizations (3 Columns) */
@media (max-width: 991px) {
    .smhome-prod-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
    }
}

/* 8. Mobile Optimizations (2 Columns - ZERO OVERFLOW) */
@media (max-width: 575px) {
    .smhome-ci {
        padding: 0 8px !important;
        width: 100% !important;
        overflow: hidden !important;
    }

    .smhome-prod-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
        padding: 0 !important;
        overflow: visible !important;
        margin: 10px 0 !important;
    }

    .smhome-p-card {
        width: 100% !important;
        min-width: 0 !important;
        border-radius: 8px !important;
        overflow: hidden !important;
    }

    .smhome-p-img-wrap {
        height: var(--p-img-h-mob) !important;
        aspect-ratio: auto !important;
    }

    .smhome-p-body {
        padding: 8px !important;
    }

    .smhome-p-name {
        font-size: 12px !important;
        margin-bottom: 2px !important;
    }

    .smhome-p-price {
        font-size: 14px !important;
    }

    .smhome-p-old {
        font-size: 10px !important;
        margin-left: 2px !important;
    }

    .smhome-p-order-btn {
        font-size: 10px !important;
        padding: 6px 0 !important;
        margin-top: 6px !important;
    }

    .smhome-circle-item {
        /* Mobile limits removed to respect admin settings */
    }

    .smhome-circle-img {
        /* Mobile limits removed to respect admin settings */
    }

    /* Full-Bleed Mobile Layout */
    .container,
    .container-fluid,
    .main-site-content {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .smhome-ci,
    .cp,
    .sp,
    .pdp,
    .all-products,
    .shop,
    .checkout-page,
    .os-page {
        padding-left: 10px !important;
        padding-right: 10px !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Product Grid Edge-to-Edge */
    .smhome-prod-grid,
    .smp-grid,
    .ofp-grid,
    .cp-prod-grid,
    .na-grid {
        margin-left: -5px !important;
        margin-right: -5px !important;
        width: calc(100% + 10px) !important;
        gap: 8px !important;
    }
}

/* 8.5 Extra Small Mobile (iPhone SE/S8+ 360px-375px) */
@media (max-width: 380px) {
    .smhome-ci {
        padding: 0 4px !important;
    }

    .smhome-prod-grid {
        gap: 5px !important;
        margin: 5px 0 !important;
    }

    .smhome-p-body {
        padding: 6px !important;
    }

    .smhome-p-name {
        font-size: 11px !important;
    }

    .smhome-p-price {
        font-size: 13px !important;
    }

    .smhome-p-order-btn {
        font-size: 9px !important;
        padding: 5px 0 !important;
    }
}

/* ── Design Restoration & Sticky ── */
.top-bar {
    background-color: var(--top-bg) !important;
    color: var(--top-text) !important;
    position: relative;
    z-index: 2000002;
}

.top-bar a {
    color: var(--top-text) !important;
}

.sticky-wrapper {
    width: 100% !important;
    z-index: 10000 !important;
    background: #fff !important;
    transition: all 0.3s ease !important;
}

.sticky-wrapper.is-sticky {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
    animation: slideDown 0.3s ease-out !important;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

.site-hdr {
    position: static !important;
    background-color: var(--main-bg, #fff) !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-bottom: 1px solid #f1f3f7 !important;
}

.site-nav {
    position: static !important;
    background: var(--red) !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 55px !important;
    display: flex !important;
    align-items: center;
}

.site-nav>div {
    overflow: visible !important;
    height: 100% !important;
}

.site-nav__in {
    display: flex !important;
    align-items: center !important;
    height: 100% !important;
    width: 100% !important;
    overflow: visible !important;
}

/* ── LAYOUT FIX: Lower Stacking for Page content ── */
.main-site-content {
    position: relative !important;
    z-index: 1 !important;
}

.page-wrap.no-sidebar {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    position: relative !important;
    z-index: 1 !important;
}

/* ── FULL WIDTH CONTAINER FIX ── */
.container-fluid .page-wrap {
    max-width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* ── From Index Blade ── */
.smhome-p-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.smhome-p-img {
    width: 100%;
    object-fit: cover;
    display: block;
    border-bottom: 1.5px solid var(--border);
    transition: transform .4s;
    background: #f9fafb;
}

.smhome-order-form {
    margin: 0;
    padding: 0;
}

.smhome-p-order-btn--out {
    background: #e5e7eb;
    color: #9ca3af !important;
    -webkit-text-fill-color: #9ca3af !important;
    cursor: not-allowed;
    pointer-events: none;
}

.grid-mode {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 15px !important;
    overflow-x: visible !important;
}

.grid-mode .smhome-circle-item {
    flex: 0 0 auto !important;
}

.smhome-circle-item {
    margin: 0 8px !important;
    vertical-align: top !important;
}

.smhome-circle-item p {
    margin-top: 8px !important;
    font-size: 0.85em !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    color: #333 !important;
    white-space: normal !important;
    word-break: break-word !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.smhome-circle-img {
    transition: transform 0.3s ease, border-color 0.3s ease !important;
    border: 2px solid transparent !important;
}

.smhome-circle-item:hover .smhome-circle-img {
    transform: translateY(-3px) !important;
    border-color: var(--red) !important;
}

/* Homepage Hot Deal & Landing Buttons */
.smhome-hot-deal-card {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    border-radius: 14px;
    padding: 16px;
    color: #fff;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 20px rgba(255, 75, 43, 0.3);
}

.smhome-hot-deal-card:hover {
    transform: scale(1.03);
    filter: brightness(1.1);
}

.smhome-hot-deal-badge {
    background: #fff;
    color: #ff4b2b;
    font-size: 10px;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.smhome-hot-deal-card span {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

.smhome-hot-deal-card i {
    position: absolute;
    right: 15px;
    bottom: 15px;
    font-size: 24px;
    opacity: 0.8;
}

/* Mobile Landing Strip */
.smhome-landing-mobile-btn-wrap {
    padding: 10px;
    background: #fff;
    margin-bottom: 10px;
}

.smhome-landing-mobile-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 14px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
    animation: landingPulse 2s infinite;
}

@keyframes landingPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(118, 75, 162, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(118, 75, 162, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(118, 75, 162, 0);
    }
}

/* ══════════════════════════════════════════════════════════════════════════════
   PREMIUM BOXED LAYOUT & DYNAMIC GENERAL SETTINGS OVERRIDES (DESKTOP)
   ══════════════════════════════════════════════════════════════════════════════ */
@media (min-width: 992px) {
    /* 1. Constrain & center all boxed containers */
    .container {
        max-width: 1200px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    
    /* 2. Elegant card-like containment for main site content in boxed mode */
    .main-site-content.container {
        max-width: 1200px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.03) !important;
        border-radius: 16px !important;
        background: #ffffff !important;
        padding: 24px !important;
        margin-top: 24px !important;
        margin-bottom: 48px !important;
        border: 1px solid #eef2f6 !important;
    }

    /* 3. Page wrap inside boxed main container spacing resets */
    .main-site-content.container .page-wrap {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Widescreen Enhancement to minimize side gaps on large monitors */
@media (min-width: 1400px) {
    .container {
        max-width: 1750px !important;
    }
    .main-site-content.container {
        max-width: 1750px !important;
    }
}

@media (min-width: 1600px) {
    .container {
        max-width: 1750px !important;
    }
    .main-site-content.container {
        max-width: 1750px !important;
    }
}

/* 4. Dynamic Footer Theme Overrides (Enforces General Settings Colors) */
.site-footer {
    background: var(--footer-bg) !important;
    color: var(--footer-text) !important;
    border-top: 2px solid var(--red) !important;
}

.site-footer .footer-col__title,
.site-footer .foot-logo,
.site-footer .foot-desc,
.site-footer .foot-contact-item,
.site-footer .footer-col__list li a,
.site-footer .social-item,
.site-footer .footer-btm__copy {
    color: var(--footer-text) !important;
    opacity: 0.92;
}

.site-footer .footer-col__list li a:hover,
.site-footer .social-item:hover,
.site-footer .foot-logo:hover {
    color: var(--red) !important;
    opacity: 1 !important;
}

.site-footer .footer-col__list li a i,
.site-footer .social-item i,
.site-footer .fc-main-btn,
.back-to-top {
    background: var(--red) !important;
    color: #ffffff !important;
}

.site-footer .foot-contact-item i {
    color: var(--red) !important;
}

/* ══════════════════════════════════════════════════════════════════════════════
   5. HOMEPAGE PRODUCT GRID SMOOTH AUTO-SLIDER CAROUSEL
   ══════════════════════════════════════════════════════════════════════════════ */
.smhome-prod-grid-slider {
    display: flex !important;
    overflow-x: auto !important;
    scroll-behavior: smooth !important;
    flex-wrap: nowrap !important;
    gap: 15px !important;
    padding: 10px 5px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Hide scrollbars completely while preserving horizontal scroll functionality */
.smhome-prod-grid-slider::-webkit-scrollbar {
    display: none !important;
}
.smhome-prod-grid-slider {
    -ms-overflow-style: none !important;  /* IE and Edge */
    scrollbar-width: none !important;  /* Firefox */
}

/* Widescreen Desktop / Large Laptop: 4 items in a row (calc(25% - 11.25px)) */
.smhome-prod-grid-slider .smhome-p-item {
    flex: 0 0 calc(25% - 11.25px) !important;
    min-width: calc(25% - 11.25px) !important;
    box-sizing: border-box !important;
    display: block !important; /* Ensure hidden items are visible in slider */
}

/* Normal Laptop: 3 items in a row (calc(33.333% - 10px)) */
@media (max-width: 991px) {
    .smhome-prod-grid-slider .smhome-p-item {
        flex: 0 0 calc(33.333% - 10px) !important;
        min-width: calc(33.333% - 10px) !important;
    }
}

/* Mobile Devices: 2 items in a row (calc(50% - 7.5px)) */
@media (max-width: 575px) {
    .smhome-prod-grid-slider .smhome-p-item {
        flex: 0 0 calc(50% - 7.5px) !important;
        min-width: calc(50% - 7.5px) !important;
        padding: 0 !important;
    }
}

/* Slider wrapper */
.smhome-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Arrow buttons base style */
.smhome-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #334155;
    cursor: pointer;
    z-index: 20;
    opacity: 0;
    transition: all 0.3s ease;
}
.smhome-slider-btn.left  { left: 4px; }
.smhome-slider-btn.right { right: 4px; }
.smhome-slider-btn:hover {
    background: #ffffff !important;
    color: var(--red) !important;
    border-color: var(--red) !important;
    transform: translateY(-50%) scale(1.1) !important;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12) !important;
}