/*===================================================
  HELORA Mobile Responsive Styles
  Fixes category grid, banner, product cards, and 
  general layout for mobile screens
===================================================*/

/* --------------------------------------------------------------------------
   BANNER RESPONSIVE BG FIX
   (Supports <picture> for separate Desktop/Mobile images)
   -------------------------------------------------------------------------- */
.banner__item {
    position: relative;
    overflow: hidden;
    height: 500px;
    /* Matches desktop height */
    display: flex;
    align-items: center;
}

.banner__pic {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.banner__pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner__text {
    position: relative;
    z-index: 1;
    width: 100%;
}

/* ─────────────────────────────────────────────────
   TABLET VIEW (max-width: 991px)
   ───────────────────────────────────────────────── */
@media only screen and (max-width: 991px) {

    .banner__item {
        height: 380px;
    }

    .banner__text h1 {
        font-size: 58px;
    }

    .banner__text span {
        font-size: 15px;
    }

    /* Categories - reduce heights at tablet */
    .categories__item {
        height: 230px;
        padding-left: 20px;
        margin-bottom: 6px;
        margin-right: 6px;
    }

    .categories__item.categories__large__item {
        height: 466px;
        /* = 2 × 230px + 6px gap */
        padding-left: 30px;
    }

    .categories__text h1 {
        font-size: 52px;
    }

    .categories__text h4 {
        font-size: 16px;
    }

    /* Spacing */
    .spad {
        padding-top: 60px;
        padding-bottom: 60px;
    }

    /* Services - 2 per row naturally */
    .services__item {
        margin-bottom: 30px;
    }

    /* Instagram */
    .instagram__item {
        height: 220px;
    }

    /* Product Cards */
    #premiumGrid .col-lg-3 {
        margin-bottom: 20px;
    }

    /* Product image bigger on tablet */
    .product__item__pic {
        height: 300px;
    }
}

/* ─────────────────────────────────────────────────
   WIDE MOBILE (max 767px)
───────────────────────────────────────────────── */
@media only screen and (max-width: 767px) {

    /* Fix: header must be position:relative so canvas__open
       is anchored to the header, not the page top (which
       causes it to hide behind the ticker bar) */
    .header {
        position: relative;
    }

    /* Raise hamburger above the ticker overlay */
    .canvas__open {
        z-index: 10000;
    }

    .banner__item {
        height: 300px;
    }

    .banner__text h1 {
        font-size: 42px;
        line-height: 1.1;
        margin-bottom: 8px;
    }

    .banner__text span {
        font-size: 13px;
        letter-spacing: 1px;
    }

    .banner__text a {
        font-size: 12px;
    }

    .banner__slider.owl-carousel .owl-dots {
        top: 262px;
    }

    /* ── CATEGORIES ──
     HTML structure:
       col-12 col-md-6  → categories__large__item  (full width)
       col-12 col-md-6  → row no-gutters
           col-6 × 4   → categories__item          (2 per row)
  ── */
    .categories {
        margin-top: 0;
    }

    /* Large item - nice big hero card */
    .categories__item.categories__large__item {
        height: 220px;
        width: 100%;
        padding-left: 22px;
        margin-bottom: 0;
        margin-right: 0;
    }

    .categories__item.categories__large__item .categories__text {
        max-width: 100%;
    }

    /* Small items - 2 per row grid */
    .categories__item {
        height: 150px;
        padding-left: 14px;
        margin-bottom: 0;
        margin-right: 0;
    }

    /* Category text sizes on mobile */
    .categories__text h1 {
        font-size: 34px;
        margin-bottom: 4px;
    }

    .categories__item.categories__large__item .categories__text h1 {
        font-size: 38px;
    }

    .categories__text h4 {
        font-size: 14px;
        font-weight: 700;
        margin-bottom: 2px;
    }

    .categories__text p {
        font-size: 11px;
        margin-bottom: 5px;
        color: #555;
    }

    .categories__text a {
        font-size: 11px;
        padding: 0 0 2px;
    }

    /* ── NEW ARRIVALS SECTION ── */
    .product {
        padding-top: 40px;
        padding-bottom: 30px;
    }

    .section-title {
        margin-bottom: 20px;
    }

    /* Filter tabs – scrollable pill chips */
    .filter__controls {
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
        padding: 4px 0 12px;
        margin-bottom: 20px;
        scrollbar-width: none;
        /* Firefox */
        text-align: left !important;
    }

    /* Hide horizontal scrollbar on webkit */
    .filter__controls::-webkit-scrollbar {
        display: none;
    }

    .filter__controls li {
        flex-shrink: 0;
        list-style: none;
        display: inline-flex;
        align-items: center;
        white-space: nowrap;
        font-size: 12px;
        font-weight: 600;
        color: #333;
        padding: 6px 16px;
        border: 1.5px solid #ddd;
        border-radius: 50px;
        cursor: pointer;
        margin-right: 0;
        transition: all 0.2s ease;
        background: #fff;
    }

    .filter__controls li.active,
    .filter__controls li:hover {
        background: #ca1515;
        border-color: #ca1515;
        color: #fff;
    }

    /* hide the ::after underline used on desktop */
    .filter__controls li::after {
        display: none !important;
    }

    /* New arrivals product grid - 2 per row */
    .property__gallery .col-lg-3 {
        width: 50%;
        max-width: 50%;
        flex: 0 0 50%;
        padding-left: 8px;
        padding-right: 8px;
    }

    .product__item__pic {
        height: 210px;
    }

    /* Section heading row on "Our Collection" */
    .row.align-items-end>.col-lg-6.text-right {
        text-align: left !important;
        margin-top: 6px;
    }

    /* ── OUR COLLECTION (Premium Grid) ── */
    .spad {
        padding-top: 40px;
        padding-bottom: 40px;
    }

    #premiumGrid>[class*="col-"] {
        width: 50%;
        max-width: 50%;
        flex: 0 0 50%;
        margin-bottom: 16px;
        padding-left: 8px;
        padding-right: 8px;
    }

    .pm-card__body {
        padding: 10px 10px 12px;
        gap: 3px;
    }

    .pm-card__name {
        font-size: 12px;
    }

    .pm-card__cat {
        font-size: 9px;
    }

    /* ── SERVICES ── */
    .services {
        padding-top: 40px;
        padding-bottom: 20px;
    }

    /* 2-column grid: items centered, icon above text */
    .services__row {
        display: flex;
        flex-wrap: wrap;
    }

    .services__item {
        padding-left: 0;
        text-align: center;
        margin-bottom: 28px;
        position: relative;
    }

    .services__item i {
        position: static;
        display: block;
        font-size: 30px;
        margin-bottom: 10px;
    }

    .services__item h6 {
        font-size: 13px;
        font-weight: 700;
        margin-bottom: 4px;
    }

    .services__item p {
        font-size: 11px;
        line-height: 1.5;
        margin-bottom: 0;
    }

    /* ── INSTAGRAM ── */
    .instagram__item {
        height: 120px;
    }

    .instagram__text i {
        font-size: 20px;
    }

    .instagram__text a {
        font-size: 11px;
        margin-top: 5px;
    }

    /* ── TICKER BAR ── */
    .ticker__item {
        font-size: 9px;
        letter-spacing: 1.5px;
    }

    .ticker-wrap {
        padding: 7px 0;
    }
}

/* ─────────────────────────────────────────────────
   SMALL MOBILE (max 479px)
───────────────────────────────────────────────── */
@media only screen and (max-width: 479px) {

    .banner__item {
        height: 260px;
    }

    .banner__text h1 {
        font-size: 34px;
    }

    .banner__text span {
        font-size: 11px;
    }

    .banner__slider.owl-carousel .owl-dots {
        top: 222px;
    }

    /* Large category */
    .categories__item.categories__large__item {
        height: 190px;
        padding-left: 16px;
    }

    .categories__item.categories__large__item .categories__text h1 {
        font-size: 30px;
    }

    /* Small categories */
    .categories__item {
        height: 120px;
        padding-left: 10px;
    }

    .categories__text h4 {
        font-size: 12px;
        margin-bottom: 2px;
    }

    .categories__text p {
        font-size: 10px;
        margin-bottom: 3px;
    }

    .categories__text a {
        font-size: 10px;
    }

    /* Product grid stays 2 per row */
    .property__gallery .col-lg-3,
    #premiumGrid>[class*="col-"] {
        width: 50%;
        max-width: 50%;
        flex: 0 0 50%;
        padding-left: 6px;
        padding-right: 6px;
    }

    .product__item__pic {
        height: 170px;
    }

    /* Section padding - tight on tiny screens */
    .spad {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .product {
        padding-top: 30px;
        padding-bottom: 20px;
    }

    /* Services */
    .services__item {
        margin-bottom: 22px;
    }

    .services__item i {
        font-size: 26px;
        margin-bottom: 8px;
    }

    .services__item h6 {
        font-size: 12px;
    }

    .services__item p {
        font-size: 10px;
    }

    /* Instagram */
    .instagram__item {
        height: 100px;
    }

    /* Typography */
    h1 {
        font-size: 40px;
    }

    h2 {
        font-size: 26px;
    }
}

/* ─────────────────────────────────────────────────
   GLOBAL FIXES (apply to all screen sizes)
───────────────────────────────────────────────── */

/* Ensure categories use cover background centered */
.categories__item {
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
}

/* Prevent category text from overflowing */
.categories__text {
    max-width: 100%;
}

/* No-gutters fix for Bootstrap 4 */
.no-gutters>.col,
.no-gutters>[class*="col-"] {
    padding-right: 0;
    padding-left: 0;
}

/* ── SHOP PAGE MOBILE FIXES ── */
@media only screen and (max-width: 991px) {
    .shop__sidebar {
        margin-bottom: 50px;
    }
}

@media only screen and (max-width: 767px) {

    /* ── NEW OFF-CANVAS SHOP SIDEBAR ── */

    /* Overlay for background dimming */
    .shop-filter-overlay {
        position: fixed;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.6);
        z-index: 9999;
        visibility: hidden;
        opacity: 0;
        transition: all 0.3s ease;
    }

    .shop-filter-overlay.active {
        visibility: visible;
        opacity: 1;
    }

    /* Fixed Side Drawer */
    .mobile-filter-drawer {
        position: fixed !important;
        left: -280px !important;
        /* Start off-screen */
        top: 0 !important;
        width: 280px !important;
        height: 100% !important;
        background: #fff !important;
        z-index: 10000 !important;
        padding: 20px !important;
        overflow-y: auto !important;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1) !important;
        transition: left 0.4s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
        display: block !important;
        margin-bottom: 0 !important;
    }

    .mobile-filter-drawer.active {
        left: 0 !important;
    }

    /* Drawer UI Elements */
    .drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 20px;
        margin-bottom: 20px;
        border-bottom: 1px solid #eee;
    }

    .drawer-header h4 {
        font-size: 18px;
        font-weight: 700;
        text-transform: uppercase;
        margin: 0;
    }

    .close-drawer {
        font-size: 28px;
        cursor: pointer;
        color: #111;
        line-height: normal;
    }

    /* Show Filters Toggle Button */
    .mobile-filter-toggle {
        margin-top: 5px;
        margin-bottom: 25px;
        text-align: left;
    }

    .filter-toggle-btn {
        width: auto !important;
        display: inline-flex !important;
        align-items: center;
        background: #fff !important;
        color: #111 !important;
        border: 1px solid #ddd !important;
        padding: 10px 20px !important;
        font-size: 13px !important;
        font-weight: 600 !important;
        text-transform: uppercase;
        border-radius: 4px !important;
        gap: 8px !important;
    }

    /* Standard block filters within drawer - override any old backgrounds */
    .sidebar__filter,
    .sidebar__sizes,
    .sidebar__color,
    .sidebar__categories {
        display: block !important;
        margin-bottom: 30px !important;
        padding: 0 !important;
        background: transparent !important;
        border: none !important;
        opacity: 1 !important;
    }

    .shop__sidebar .section-title {
        margin-bottom: 15px !important;
    }

    /* Product card icon fixes for 2-column mobile */
    .product__hover li {
        margin-right: 5px !important;
    }

    .product__hover li a {
        height: 35px !important;
        width: 35px !important;
        line-height: 35px !important;
        font-size: 14px !important;
    }

    .product__item__pic .label {
        font-size: 10px;
        padding: 2px 8px;
    }

    .product__item__text h6 a {
        font-size: 13px;
    }

    .product__item {
        margin-bottom: 20px;
    }

    .product__item__pic {
        height: 200px;
    }

    .product__item__text {
        padding-top: 10px;
    }

    .product__item__text h6 {
        font-size: 13px;
        height: 38px;
        overflow: hidden;
    }

    .product__price {
        font-size: 14px;
    }
}

/* ── Hide hamburger menu on desktop (lg+) only ── */
@media only screen and (min-width: 992px) {
    .canvas__open {
        display: none !important;
    }
}

/* ── Force hamburger visible on mobile & tablet ── */
@media only screen and (max-width: 991px) {
    .canvas__open {
        display: block !important;
    }
}

/* ── CART PAGE MOBILE FIXES ── */
@media only screen and (max-width: 767px) {
    .cart-card {
        display: block;
        /* Stack container for float control */
        padding: 15px;
        position: relative;
        overflow: hidden;
    }

    .cc-img {
        float: left;
        width: 70px;
        margin-right: 15px;
        margin-bottom: 5px;
    }

    .cc-img img {
        width: 70px;
        height: 70px;
        object-fit: cover;
        border-radius: 8px;
    }

    .cc-body {
        margin-bottom: 15px;
        overflow: hidden;
        /* Clearfix effect */
    }

    .cc-name {
        font-size: 14px;
        line-height: 1.3;
        margin-bottom: 4px;
        display: block;
        padding-right: 25px;
        /* Leave room for X button */
        color: #111;
    }

    .cr-price {
        font-size: 13px;
        color: #888;
        font-weight: 600;
        display: block;
    }

    /* Row for Quantity and Total */
    .cr-qty {
        float: left;
        clear: both;
        margin-top: 5px;
    }

    .cr-total {
        float: right;
        margin-top: 15px;
        text-align: right;
        font-size: 17px;
        font-weight: 800;
        color: #ca1515;
    }

    .cr-total::before {
        content: "Total: ";
        font-size: 11px;
        font-weight: 600;
        color: #aaa;
        text-transform: uppercase;
        margin-right: 3px;
    }

    .cc-remove {
        position: absolute;
        top: 12px;
        right: 10px;
        z-index: 5;
    }

    /* Cart footer buttons */
    .cart-btn-light,
    .cart-btn-dark {
        width: 100%;
        justify-content: center;
        margin-bottom: 10px;
        display: flex;
    }
}

/* ── CHECKOUT PAGE MOBILE FIXES ── */
@media only screen and (max-width: 767px) {
    .checkout.spad {
        padding: 30px 0;
    }

    .billing-card,
    .checkout__order {
        padding: 20px 15px;
        border-radius: 10px;
    }

    .checkout-submit-btn {
        padding: 12px;
        font-size: 14px;
    }

    .payment-option {
        padding: 12px;
        font-size: 14px;
    }
}

/* ── CONTACT PAGE MOBILE FIXES ── */
@media only screen and (max-width: 767px) {
    .contact__map {
        height: 300px;
        /* Smaller map on mobile */
        margin-top: 30px;
    }

    .contact__map iframe {
        height: 300px !important;
    }

    .contact__content {
        margin-bottom: 0;
    }
}

/* ── PRODUCT DETAILS MOBILE FIXES ── */
@media only screen and (max-width: 767px) {
    .product__details__pic {
        margin-bottom: 30px;
    }

    /* Keep vertical thumbnails hidden on mobile for cleaner look, main slider handles images */
    .product__details__pic__left {
        display: none;
    }

    /* Main slider content takes full width */
    .product__details__slider__content {
        width: 100%;
        margin-left: 0;
    }

    .product__details__text {
        text-align: left;
    }

    .product__details__text h3 {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .product__details__price {
        font-size: 26px;
        margin-bottom: 20px;
    }

    .product__details__button {
        justify-content: flex-start;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .product__details__button .cart-btn {
        margin-right: 0;
        width: calc(100% - 60px);
        /* Leave room for heart/adjust icons */
        margin-bottom: 0;
    }

    .product__details__button ul {
        display: flex;
        gap: 5px;
    }

    .product__details__widget {
        padding-top: 25px;
    }

    .product__details__widget ul li {
        text-align: left;
    }

    .product__details__widget ul li span {
        width: 120px;
    }
}

/* ── GENERAL TOUCH TARGETS ── */
@media only screen and (max-width: 767px) {

    button,
    .cart-btn,
    .site-btn,
    .primary-btn {
        min-height: 44px;
        /* Apple/Google touch target minimum */
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    input,
    select,
    textarea {
        font-size: 16px !important;
        /* Prevents auto-zoom on iOS */
    }
}