@import url("common.css");
@import url("icons.css");
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "./icomoon/style.css";

.menu-main ul li.logo a::before,
.menu-main ul li.logo .link::before {
    display: none !important;
    width: 0 !important;
}
.menu-main ul li.logo:hover a::before,
.menu-main ul li.logo:hover .link::before {
    display: none !important;
    width: 0 !important;
}

/* ── Custom Header CSS ── */
.custom-header-height {
    height: 80px !important;
}
.custom-mega-top {
    top: 80px !important;
}
.custom-logo-mobile {
    height: 60px !important;
    max-height: none !important;
}
.custom-logo-desktop {
    height: 85px !important;
    max-height: none !important;
}

@media (min-width: 768px) {
    .custom-header-height {
        height: 105px !important;
    }
    .custom-mega-top {
        top: 105px !important;
    }
}

#menu-mobile ul li a::before {
    display: none !important;
}

/* Fix mega-menu hover — the div wrapper broke the direct-child SCSS selector */
.menu-main ul li:hover .mega-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: scaleY(1) !important;
}

/* Fix active-link underline to sit directly below the word text */
.menu-main ul li > a::before,
.menu-main ul li > .link::before {
    bottom: auto !important;
    top: calc(50% + 13px) !important;
}

/* Login popup */
.user-icon .login-popup.js-open {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}
.login-popup {
    right: 0;
    left: auto;
}

/* Change .button-main to use primary brand color */
.button-main {
    background-color: #951010 !important;
    color: #fff !important;
}
.button-main:hover {
    background-color: #6e0b0b !important;
    color: #fff !important;
}
.button-main:visited {
    background-color: #951010 !important;
    color: #fff !important;
}
.button-main:visited:hover {
    background-color: #6e0b0b !important;
    color: #fff !important;
}

/* Keep the white-background variant correct */
.button-main.bg-white {
    background-color: #fff !important;
    color: #1f1f1f !important;
}
.button-main.bg-white:hover {
    background-color: #951010 !important;
    color: #fff !important;
}
.button-main.bg-white:visited {
    background-color: #fff !important;
    color: #1f1f1f !important;
}

/* Global helper classes for brand color */
.bg-primary {
    background-color: #951010 !important;
}
.bg-primary-dark {
    background-color: #6e0b0b !important;
}
.text-primary {
    color: #951010 !important;
}
.border-primary {
    border-color: #951010 !important;
}

/* Currency dropdown positioning */
.choose-currency .select { position: relative; }
.choose-currency .list-option {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    right: 0 !important;
    left: auto !important;
    min-width: 210px !important;
    z-index: 99999 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(8px) !important;
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease !important;
    background: #fff !important;
    box-shadow: 0 6px 20px rgba(0,0,0,.12) !important;
    border-radius: 0.5rem !important;
    padding: 0.25rem 0 !important;
}
/* RTL: open to the left instead of right */
[dir="rtl"] .choose-currency .list-option {
    right: auto !important;
    left: 0 !important;
}
.choose-currency.js-open .list-option {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Subcategory links in mega-menu should be smaller than category headings */
.mega-menu .nav-sub-link {
    font-size: 13px !important;
}

/* Subcategory links in mobile menu should be smaller than category headings (14px) */
#menu-mobile .nav-item-mobile {
    font-size: 13px !important;
}

/* Cart & Wishlist modals — responsive width & positioning */
.modal-cart-main,
.modal-wishlist-main {
    width: 100% !important;
    right: 0 !important;
    top: 0 !important;
    height: 100vh !important;
    border-radius: 0 !important;
}
.modal-cart-main.open,
.modal-wishlist-main.open {
    right: 0 !important;
}
@media (min-width: 768px) {
    .modal-cart-main,
    .modal-wishlist-main {
        width: 540px !important;
        right: -100% !important;
        top: 20px !important;
        height: calc(100vh - 40px) !important;
        border-radius: 32px !important;
    }
    .modal-cart-main.open,
    .modal-wishlist-main.open {
        right: 20px !important;
    }
}

/* Quick View modal — mobile full-screen (same as cart/wishlist), desktop side panel */
/* Mobile: always at right:0, height:100% overrides template's calc(100vh-40px) */
.modal-quickview-main {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    display: grid !important;
    grid-template-rows: auto 1fr auto !important;
}
/* Scrollable middle row */
.qv-body {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}
/* Image column: side-by-side default */
.qv-image-col {
    width: 120px;
    flex-shrink: 0;
}
/* Mobile stacked layout — image on top, info below (all screens < 768px) */
@media (max-width: 767px) {
    .qv-top-card {
        flex-direction: column !important;
        padding: 0 !important;
        gap: 0 !important;
    }
    .qv-image-col {
        width: 100% !important;
        flex-shrink: unset !important;
    }
    .qv-main-img-wrap {
        border-radius: 0 !important;
        aspect-ratio: unset !important;
        height: 200px !important;
        max-height: none !important;
        overflow: hidden !important;
        background: #f5f5f5 !important;
    }
    .qv-main-img-wrap img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
    }
    .qv-info-col {
        padding: 0.875rem 1rem !important;
    }
}
/* Desktop: narrower side panel sliding from right */
@media (min-width: 768px) {
    .modal-quickview-main {
        top: 20px !important;
        left: auto !important;
        right: -100% !important;
        bottom: 20px !important;
        width: 560px !important;
        border-radius: 32px !important;
        transition: right 0.5s ease !important;
    }
    .modal-quickview-main.open {
        right: 20px !important;
    }
    .qv-image-col {
        width: 160px;
    }
}

/* Breadcrumb inner container — equal top/bottom padding */
.breadcrumb-inner {
    padding-top: 50px;
    padding-bottom: 50px;
}
@media (min-width: 1024px) {
    .breadcrumb-inner {
        padding-top: 70px;
        padding-bottom: 70px;
    }
}

/* Payment icons — card-style shadow */
.payment-img img {
    border-radius: 6px;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.12),
        0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Instagram swiper — give container a fixed height so slides render on every page including cart */
.list-instagram .swiper-instagram-three {
    overflow: hidden;
}
.swiper-instagram-three .swiper-slide {
    height: auto;
}
.swiper-instagram-three .swiper-slide .item {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
}
.swiper-instagram-three .swiper-slide .item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile header icons — explicit positioning (max-lg:right-4 not compiled in Tailwind) */
@media (max-width: 1023px) {
    .header-icons-ltr {
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
    }
    .header-icons-rtl {
        left: 1rem;
        top: 50%;
        transform: translateY(-50%);
    }
}

/* Search overlay */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}
#search-overlay input:focus {
    outline: none;
}
#search-overlay input::placeholder {
    color: #aaa;
}

/* Slider — RTL: flip sub-image to the left */
[dir="rtl"] .slider-item .sub-img {
    right: auto !important;
    left: 0;
}

/* ── Hero slides — subtle Islamic diamond lattice pattern for elegance ── */
.slider-block .slider-item {
    isolation: isolate;
}
.slider-block .slider-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='52'%3E%3Cpath d='M26 1L51 26L26 51L1 26Z' fill='none' stroke='%23503010' stroke-width='0.7' stroke-opacity='0.08'/%3E%3Cpath d='M26 14L38 26L26 38L14 26Z' fill='none' stroke='%23503010' stroke-width='0.5' stroke-opacity='0.06'/%3E%3C/svg%3E");
    background-size: 52px 52px;
    pointer-events: none;
    z-index: 0;
}
/* Right-side vignette — creates depth and frames the image naturally */
.slider-block .slider-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 90% at 90% 50%, rgba(0,0,0,0.06) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}
[dir="rtl"] .slider-block .slider-item::before {
    background: radial-gradient(ellipse 70% 90% at 10% 50%, rgba(0,0,0,0.06) 0%, transparent 65%);
}

/* Policy pages — restore spacing for rich HTML content */
.policy-block .prose h1,
.policy-block .prose h2,
.policy-block .prose h3,
.policy-block .prose h4 {
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
}
.policy-block .prose h1 {
    font-size: 1.75rem;
}
.policy-block .prose h2 {
    font-size: 1.375rem;
}
.policy-block .prose h3 {
    font-size: 1.125rem;
}
.policy-block .prose p {
    margin-bottom: 1rem;
    line-height: 1.75;
}
.policy-block .prose ul,
.policy-block .prose ol {
    padding-inline-start: 1.5rem;
    margin-bottom: 1rem;
}
.policy-block .prose ul {
    list-style-type: disc;
}
.policy-block .prose ol {
    list-style-type: decimal;
}
.policy-block .prose li {
    margin-bottom: 0.375rem;
    line-height: 1.7;
}
.policy-block .prose a {
    text-decoration: underline;
    color: inherit;
}
.policy-block .prose strong {
    font-weight: 700;
}

/* ── My Account page ─────────────────────────────────────── */
/* Hide all panels; show only active one */
.my-account-block .filter-item {
    display: none;
}
.my-account-block .filter-item.active {
    display: block;
}

/* Active sidebar tab highlight */
.my-account-block .category-item.active {
    background-color: #fff;
}

/* Address card default badge */
.address-default-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
}
[dir="rtl"] .address-default-badge {
    right: auto;
    left: 0.75rem;
}

/* ── Normalize select to match text inputs ───────────────── */
select.border-line {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem !important;
    cursor: pointer;
    line-height: 1.5;
}
[dir="rtl"] select.border-line {
    background-position: left 1rem center;
    padding-right: 1rem !important;
    padding-left: 2.5rem !important;
}

/* ── Account alert messages ──────────────────────────────── */
.account-alert {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.9375rem;
    line-height: 1.5;
}
.account-alert.success {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
}
.account-alert.error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.account-alert .alert-close {
    flex-shrink: 0;
    cursor: pointer;
    opacity: 0.6;
    font-size: 1.1rem;
    line-height: 1;
    background: none;
    border: none;
    padding: 0;
    color: inherit;
}
.account-alert .alert-close:hover {
    opacity: 1;
}

/* ── Mobile bottom bar clearance ────────────────────────────
   The fixed menu_bar is 70px tall and visible below 640px.
   Add padding-bottom to the page so content is never hidden behind it. */
@media (max-width: 639px) {
    body {
        padding-bottom: 75px;
    }
}

/* ── Footer bottom row — responsive layout ──────────────── */
.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: unset;
        gap: 1rem;
    }
    .footer-bottom .copyright {
        text-align: start;
    }
}

/* ── Cart modal — flex column layout so footer sits right below items ── */
.modal-cart-main {
    display: flex !important;
    flex-direction: column !important;
}
.modal-cart-main .list-product {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
}
.modal-cart-main .footer-modal {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    width: 100% !important;
    flex-shrink: 0 !important;
    border-top: 1px solid #f0f0f0;
}

/* ── User avatar circle (arbitrary Tailwind sizes not in pre-compiled CSS) */
.user-avatar-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.user-avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}
@media (min-width: 768px) {
    .user-avatar-circle,
    .user-avatar-img {
        width: 140px;
        height: 140px;
    }
}
