/* ==========================================================================
   Direct Shop US storefront theme: header, footer, quick view, back-to-top.
   Loaded after custom-frontend-fixes.css. Every rule is scoped to body.ds-theme
   (set in layouts/app.blade.php) so it wins over the bought theme without
   editing demo-2.css. Home-page-only styles live in home.css.
   ========================================================================== */

/* --- Header --- */
body.ds-theme header {
    height: auto !important; /* overrides inline height:123px and demo-2 fixed heights */
    position: sticky;
    top: 0;
    z-index: 1020;
    border-bottom: 1px solid #e7eaf3;
}
body.ds-theme .top-header { align-items: center; gap: 24px; }
body.ds-theme .top-header .cr-search { flex: 1; max-width: 620px; }
body.ds-theme .top-header .cr-search input {
    width: 100%; height: 46px; padding: 0 56px 0 20px;
    background: #f6f7fb; border: 1.5px solid #e7eaf3; border-radius: 999px;
    font-family: "Manrope", sans-serif; font-size: 14px; color: #1e1b4b;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
body.ds-theme .top-header .cr-search input:focus { background: #fff; border-color: #3f51b5; box-shadow: 0 0 0 4px rgba(63, 81, 181, .12); }
body.ds-theme .top-header .cr-search .search-btn { width: 38px; top: 4px; bottom: 4px; right: 4px; border-radius: 999px; background-color: #3f51b5; }
body.ds-theme .top-header .cr-search .search-btn:hover { background-color: #3343a0; }
body.ds-theme .top-header .cr-search .search-btn i { font-size: 17px; }

body.ds-theme .top-header .cr-right-bar { align-items: center; gap: 4px; }
body.ds-theme .top-header .cr-right-bar .cr-right-bar-item,
body.ds-theme .top-header .cr-right-bar .cr-right-bar-item:not(:last-child) { padding: 9px 12px; border-radius: 12px; color: #1e1b4b; }
body.ds-theme .top-header .cr-right-bar .cr-right-bar-item:hover { background: #eef0fb; color: #3f51b5; }
body.ds-theme .top-header .cr-right-bar .cr-right-bar-item span { font-family: "Manrope", sans-serif; font-weight: 600; font-size: 14px; color: inherit; }
body.ds-theme .top-header .cr-right-bar .cr-right-bar-item:hover span { color: #3f51b5; }
body.ds-theme .top-header ul.navbar-nav li.nav-item a.nav-link::before { display: none; }

/* Header wishlist count badge (on the heart icon; stays visible on phones where the label is hidden) */
body.ds-theme .top-header .ds-wishlist-link { position: relative; }
body.ds-theme .top-header .ds-wishlist-count { position: absolute; top: 2px; left: 24px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #e11d48; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; color: #fff; }

body.ds-theme .top-header ul.navbar-nav .dropdown .dropdown-menu { right: 0; min-width: 190px; padding: 6px; border: 1px solid #e7eaf3; border-radius: 14px; box-shadow: 0 10px 30px -12px rgba(30, 27, 75, .18); }
body.ds-theme .top-header ul.navbar-nav .dropdown .dropdown-menu li a { padding: 9px 12px; border-radius: 10px; font-family: "Manrope", sans-serif; font-size: 14px; font-weight: 600; color: #334155; }
body.ds-theme .top-header ul.navbar-nav .dropdown .dropdown-menu li a:hover { background: #eef0fb; color: #3f51b5; }

@media only screen and (max-width: 991px) {
    body.ds-theme .top-header { flex-wrap: wrap; gap: 12px; }
    /* demo-2 hides the right bar below 992px, which leaves phones with no Account/Cart link */
    body.ds-theme .top-header .cr-right-bar { display: flex; margin-left: auto; }
    body.ds-theme .top-header .cr-right-bar .cr-right-bar-item span { display: none; }
    body.ds-theme .top-header .cr-search { order: 3; flex-basis: 100%; max-width: none; }
    body.ds-theme .top-header .cr-search input { max-width: none; }
}
@media only screen and (max-width: 575px) {
    body.ds-theme .top-header { display: flex; }
    body.ds-theme .top-header .cr-logo { margin-bottom: 0; }
}

/* --- Footer (dark) --- */
body.ds-theme .footer { background-color: #1e1b4b; border-top: 0; }
body.ds-theme .cr-footer-logo .image img { width: 120px; padding: 8px 10px; background: #fff; border-radius: 12px; }
body.ds-theme .cr-footer h4.cr-sub-title { color: #fff; font-size: 16px; font-weight: 800; }
body.ds-theme .cr-footer ul li,
body.ds-theme .cr-footer ul li a { color: #b8bde0; }
body.ds-theme .cr-footer ul li a:hover { color: #fff; }
body.ds-theme .cr-footer ul li::after { color: #8f95c4; }
body.ds-theme .cr-footer .cr-social-media span a { width: 38px; height: 38px; background: transparent; border: 1px solid rgba(255, 255, 255, .16); border-radius: 50%; color: #c7cbe8; }
body.ds-theme .cr-footer .cr-social-media span a:hover { background: #3f51b5; border-color: #3f51b5; color: #fff; }
body.ds-theme .cr-last-footer { border-top-color: rgba(255, 255, 255, .1); }
body.ds-theme .cr-last-footer p { color: #b8bde0; }
body.ds-theme .cr-last-footer p a { color: #fff; font-weight: 700; }
body.ds-theme .cr-last-footer .payment-link img { padding: 4px 8px; background: #fff; border-radius: 8px; }
@media only screen and (max-width: 991px) {
    body.ds-theme .cr-footer h4.cr-sub-title { color: #fff; border-bottom-color: rgba(255, 255, 255, .12); }
    body.ds-theme .cr-heading-res i { color: #fff; }
}

/* --- Quick view modal (layout B: edge-to-edge image, price panel with quantity tiers) --- */
body.ds-theme .quickview-modal .modal-content { border: 0; border-radius: 24px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(15, 14, 40, .45); }
body.ds-theme .quickview-modal .modal-body { padding: 0 !important; }
body.ds-theme .quickview-modal .modal-body > .row { --bs-gutter-x: 0; margin: 0; align-items: stretch; }

/* Close button: demo-2 sizes it 5×5px */
body.ds-theme .quickview-modal .cr-close-model { top: 14px; right: 14px; width: 36px; height: 36px; padding: 0; border-radius: 50%; background-color: #f6f7fb; background-size: 12px; opacity: 1; transition: background-color .2s; }
body.ds-theme .quickview-modal .cr-close-model:hover { background-color: #e7eaf3; }
body.ds-theme .quickview-modal .cr-close-model:focus { box-shadow: 0 0 0 4px rgba(63, 81, 181, .2); }

/* Image fills the left half */
body.ds-theme .quickview-modal .col-md-5 { position: relative; }
body.ds-theme .quickview-modal .zoom-image-hover,
body.ds-theme .quickview-modal .modal-border-image { height: 100%; min-height: 460px; padding: 28px; border: 0; border-radius: 0; background: radial-gradient(circle at 50% 40%, #fff 0%, #f3f4f9 70%); justify-content: center; }
body.ds-theme .quickview-modal .zoom-image-hover img { max-height: 400px; object-fit: contain; border-radius: 10px; }
body.ds-theme .qv-badge { position: absolute; top: 18px; left: 18px; z-index: 3; padding: 5px 12px; border-radius: 999px; background: #e11d48; color: #fff; font-size: 12.5px; font-weight: 800; letter-spacing: .3px; }

/* Details column */
body.ds-theme .quickview-modal .col-md-7 { display: flex; flex-direction: column; padding: 34px 30px 28px; }
body.ds-theme .cr-size-and-weight-contain { display: flex; flex-direction: column; padding: 0 40px 0 0; border-bottom: 0; }
body.ds-theme #quickview-packaging_info { display: inline-flex; align-self: flex-start; margin-bottom: 12px; padding: 5px 12px; background: #eef0fb; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #3f51b5; }
body.ds-theme #quickview-packaging_info:empty { display: none; }
body.ds-theme .cr-size-and-weight-contain h2.heading { margin-bottom: 8px; font-family: "Manrope", sans-serif; font-size: 26px; font-weight: 800; line-height: 1.25; letter-spacing: -.3px; color: #1e1b4b; }
body.ds-theme .cr-size-and-weight-contain p { font-size: 14.5px; line-height: 1.6; color: #64748b; }
body.ds-theme .cr-size-and-weight { display: flex; flex-direction: column; flex: 1; padding-top: 18px; }

/* Price panel: the markup nests .cr-product-price twice, so demo-2's 20px top padding is cleared on both */
body.ds-theme .qv-price-panel { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 16px; background: linear-gradient(135deg, #eef0fb, #f8f9fe); border: 1px solid #dfe3f6; }
body.ds-theme .cr-size-and-weight .cr-product-price { padding-top: 0; }
body.ds-theme .qv-price-panel > .cr-product-price > .cr-product-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
body.ds-theme .cr-size-and-weight .cr-product-price span.new-price { font-family: "Manrope", sans-serif; font-size: 30px; font-weight: 800; letter-spacing: -.5px; color: #1e1b4b; }
body.ds-theme .cr-size-and-weight .cr-product-price span.old-price { font-family: "Manrope", sans-serif; font-size: 15px; font-weight: 600; color: #94a3b8; }

/* Quantity tier cards */
body.ds-theme .qv-tiers-title { margin-bottom: 10px; font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #94a3b8; }
body.ds-theme .qv-tier-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
body.ds-theme .qv-tier-card { position: relative; padding: 12px 12px 10px; background: #fff; border: 1px solid #e7eaf3; border-radius: 14px; }
body.ds-theme .qv-tier-card small { display: block; font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #94a3b8; }
body.ds-theme .qv-tier-card b { display: block; margin-top: 4px; font-family: "Manrope", sans-serif; font-size: 20px; font-weight: 800; color: #1e1b4b; }
body.ds-theme .qv-tier-card s { font-size: 12px; font-weight: 600; color: #94a3b8; }
body.ds-theme .qv-tier-card.best { border-color: #3f51b5; background: #eef0fb; }
body.ds-theme .qv-tier-card.best::before { content: "Best value"; position: absolute; top: -9px; left: 12px; padding: 2px 7px; border-radius: 6px; background: #3f51b5; color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
body.ds-theme .qv-tiers-note { margin-top: 10px; font-size: 12.5px; color: #64748b; }
body.ds-theme .qv-tiers-note:empty { display: none; }
body.ds-theme .qv-arrival { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 12px; background: #fef3c7; color: #b45309; font-weight: 800; font-size: 14px; }

/* Seller row with "View store" button */
body.ds-theme #quickview-seller_link { display: block; margin-top: auto; padding-top: 18px; color: inherit; }
body.ds-theme #quickview-seller_link .alert { align-items: center !important; gap: 12px; margin: 0; padding: 18px 0 0; background: transparent; border: 0; border-top: 1px solid #e7eaf3; border-radius: 0; color: #64748b; }
body.ds-theme .qv-seller-avatar { flex: none; width: 44px; height: 44px; border-radius: 12px; background: #3f51b5; color: #fff; font-family: "Manrope", sans-serif; font-weight: 800; font-size: 17px; display: flex; align-items: center; justify-content: center; }
body.ds-theme #quickview-seller_link .qv-seller-label { font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: #94a3b8; }
body.ds-theme #quickview-seller_link .alert h5 { margin: 1px 0 2px !important; font-family: "Manrope", sans-serif; font-size: 15.5px; font-weight: 800; color: #1e1b4b; }
body.ds-theme #quickview-seller_link .alert p { font-size: 13px; color: #64748b; }
body.ds-theme #quickview-seller_link .alert p strong { color: #1e1b4b; }
body.ds-theme #quickview-seller_link .qv-seller-cta { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 18px; border-radius: 12px; background: #3f51b5; color: #fff; font-weight: 800; font-size: 14px; white-space: nowrap; transition: background .2s; }
body.ds-theme #quickview-seller_link:hover .qv-seller-cta { background: #3343a0; }
/* Without a store link the JS sets href="javascript:void(0)": hide the button */
body.ds-theme #quickview-seller_link[href^="javascript"] .qv-seller-cta { display: none; }

@media only screen and (max-width: 767px) {
    body.ds-theme .quickview-modal .zoom-image-hover,
    body.ds-theme .quickview-modal .modal-border-image { min-height: 260px; }
    body.ds-theme .quickview-modal .col-md-7 { padding: 22px 18px; }
    body.ds-theme .cr-size-and-weight-contain h2.heading { font-size: 22px; }
    body.ds-theme .cr-size-and-weight .cr-product-price span.new-price { font-size: 26px; }
    body.ds-theme #quickview-seller_link .alert { flex-wrap: wrap; }
    body.ds-theme #quickview-seller_link .qv-seller-cta { margin-left: 0; width: 100%; justify-content: center; }
}

/* --- Product card: up to two quantity tiers --- */
body.ds-theme .cr-card-tiers { margin: 8px 0 10px; }
body.ds-theme .cr-card-tier-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
body.ds-theme .cr-card-tier { padding: 5px 8px; background: #fff; border: 1px solid #e7eaf3; border-radius: 9px; }
body.ds-theme .cr-card-tier b { display: block; font-family: "Manrope", sans-serif; font-size: 15px; font-weight: 800; color: #1e1b4b; line-height: 1.2; }
body.ds-theme .cr-card-tier s { font-size: 10.5px; font-weight: 600; color: #94a3b8; }
body.ds-theme .cr-card-tier small { display: block; margin-top: 1px; font-size: 10.5px; font-weight: 700; color: #64748b; }
body.ds-theme .cr-card-tier-more { display: inline-block; margin-top: 6px; font-size: 12.5px; font-weight: 700; color: #3f51b5; }
body.ds-theme .cr-card-tier-more:hover { color: #3343a0; text-decoration: underline; }

/* --- Product card: saved (wishlisted) heart. Colour only; position and hover rules unchanged --- */
body.ds-theme .cr-pro-actions .wishlist.active i { color: #e11d48; }

/* --- State (service area) selector --- */
/* Header button: long state names are cut off; the label is hidden on phones like the other header items */
body.ds-theme .top-header .ds-state-link span { display: inline-block; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* Chooser modal */
body.ds-theme .ds-state-modal .modal-content { position: relative; padding: 34px 30px 28px; border: 0; border-radius: 24px; text-align: center; box-shadow: 0 30px 60px -20px rgba(15, 14, 40, .45); }
body.ds-theme .ds-state-modal .ds-state-close { position: absolute; top: 14px; right: 14px; }
body.ds-theme .ds-state-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; background: #eef0fb; color: #3f51b5; font-size: 26px; display: flex; align-items: center; justify-content: center; }
body.ds-theme .ds-state-modal h4 { margin-bottom: 6px; font-family: "Manrope", sans-serif; font-size: 22px; font-weight: 800; color: #1e1b4b; }
body.ds-theme .ds-state-modal p { margin-bottom: 18px; font-size: 14px; color: #64748b; }
body.ds-theme .ds-state-modal .form-select { height: 48px; border: 1.5px solid #e7eaf3; border-radius: 12px; font-family: "Manrope", sans-serif; font-weight: 600; color: #1e1b4b; }
body.ds-theme .ds-state-modal .form-select:focus { border-color: #3f51b5; box-shadow: 0 0 0 4px rgba(63, 81, 181, .12); }
body.ds-theme .ds-state-save { width: 100%; height: 48px; margin-top: 14px; border: 0; border-radius: 12px; background: #3f51b5; color: #fff; font-weight: 800; font-size: 15px; transition: background .2s; }
body.ds-theme .ds-state-save:hover { background: #3343a0; }
body.ds-theme .ds-state-save:disabled { opacity: .7; }
body.ds-theme .ds-state-modal small { display: block; margin-top: 12px; font-size: 12.5px; color: #94a3b8; }

/* Notice bar: home page (current state) and seller page (seller doesn't serve it) */
body.ds-theme .ds-state-note { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; padding: 10px 16px; border: 1px solid #dfe3f6; border-radius: 12px; background: #eef0fb; font-size: 14px; color: #334155; }
body.ds-theme .ds-state-note i { font-size: 17px; color: #3f51b5; }
body.ds-theme .ds-state-note b { color: #1e1b4b; }
body.ds-theme .ds-state-note a { margin-left: auto; font-weight: 800; color: #3f51b5; }
body.ds-theme .ds-state-note a:hover { text-decoration: underline; }
body.ds-theme .ds-state-note.is-warning { margin-bottom: 0; border-color: #fde68a; background: #fffbeb; }
body.ds-theme .ds-state-note.is-warning i { color: #b45309; }

/* Product card + quick view: seller's service area */
body.ds-theme .home-card-area { display: block; margin-top: 2px; overflow: hidden; font-size: 12px; font-weight: 600; color: #64748b; white-space: nowrap; text-overflow: ellipsis; }
body.ds-theme .home-card-area i { color: #3f51b5; }
body.ds-theme .qv-area { display: flex; align-items: flex-start; gap: 6px; margin-top: 14px; font-size: 13.5px; color: #64748b; }
body.ds-theme .qv-area i { font-size: 16px; color: #3f51b5; }
body.ds-theme .qv-area b { color: #1e1b4b; }

/* --- Back to top --- */
body.ds-theme a.back-to-top { background-color: #3f51b5; border-color: #3f51b5; color: #fff; }
body.ds-theme a.back-to-top .back-to-top-wrap svg path { stroke: rgba(255, 255, 255, .6); }
