/* Featured Items Slider Navigation Buttons */
.swiperOutsideContainer .swiper-button-next,
.swiperOutsideContainer .swiper-button-prev {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.5) !important;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s ease;
    cursor: pointer;
    pointer-events: auto;
}

.swiperOutsideContainer .swiper-button-next:hover,
.swiperOutsideContainer .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.8) !important;
}

/* Disabled state for buttons at start/end */
.swiperOutsideContainer .swiper-button-disabled {
    opacity: 0 !important;
    visibility: hidden !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    transform: translateY(-50%) scale(0) !important;
    background: rgba(0, 0, 0, 0.2) !important;
}

.swiperOutsideContainer .swiper-button-disabled:hover {
    background: rgba(0, 0, 0, 0.2) !important;
}

.swiperOutsideContainer .swiper-button-next {
    right: -20px;
    left: auto;
}

.swiperOutsideContainer .swiper-button-prev {
    left: -20px;
    right: auto;
}

.swiperOutsideContainer .swiper-button-next .el-button,
.swiperOutsideContainer .swiper-button-prev .el-button {
    background: transparent !important;
    border: none !important;
    color: white !important;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    cursor: inherit;
    pointer-events: none;
    cursor: inherit;
    pointer-events: none;
}

.swiperOutsideContainer .swiper-button-next .el-button i,
.swiperOutsideContainer .swiper-button-prev .el-button i {
    font-size: 16px;
    pointer-events: none;
    pointer-events: none;
}

/* Remove content from swiper default buttons */
.swiperOutsideContainer .swiper-button-next::after,
.swiperOutsideContainer .swiper-button-prev::after {
    content: '' !important;
}

/* Ensure slider items have higher z-index and proper click handling */
.swiperOutsideContainer .swiper-slide {
    z-index: 15 !important;
    position: relative;
}

/* Improve click interaction on slides */
.swiperOutsideContainer .swiper-slide .swiperSlide {
    cursor: pointer;
    pointer-events: auto !important;
    position: relative;
    z-index: 20 !important;
}

/* Ensure slide content has highest priority for clicks */
.swiperOutsideContainer .swiper-slide .swiperSlide * {
    pointer-events: auto !important;
    z-index: 25 !important;
    position: relative;
}

/* Container padding to accommodate external buttons */
.swiperOutsideContainer {
    padding: 0 50px !important;
    margin: 0 -50px !important;
}

/* Override container padding on mobile */
@media screen and (max-width: 768px) {
    .swiperOutsideContainer {
        padding: 0 45px !important;
        margin: 0 -45px !important;
    }
    
    .swiperOutsideContainer .swiper-button-next {
        right: -15px;
    }
    
    .swiperOutsideContainer .swiper-button-prev {
        left: -15px;
    }
}

@media screen and (max-width: 480px) {
    .swiperOutsideContainer {
        padding: 0 40px !important;
        margin: 0 -40px !important;
    }
    
    .swiperOutsideContainer .swiper-button-next {
        right: -10px;
    }
    
    .swiperOutsideContainer .swiper-button-prev {
        left: -10px;
    }
}

/* Override the general swiper button hiding rules */
.swiperOutsideContainer .swiper-button-next:not(.swiper-button-disabled),
.swiperOutsideContainer .swiper-button-prev:not(.swiper-button-disabled) {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Force hide disabled buttons completely */
.swiperOutsideContainer .swiper-button-disabled {
    display: none !important;
    pointer-events: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .swiperOutsideContainer .swiper-button-next,
    .swiperOutsideContainer .swiper-button-prev {
        width: 35px;
        height: 35px;
    }
    
    .swiperOutsideContainer .swiper-button-next:not(.swiper-button-disabled),
    .swiperOutsideContainer .swiper-button-prev:not(.swiper-button-disabled) {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .swiperOutsideContainer .swiper-button-disabled {
        display: none !important;
    }
}

@media screen and (max-width: 480px) {
    .swiperOutsideContainer .swiper-button-next,
    .swiperOutsideContainer .swiper-button-prev {
        width: 30px;
        height: 30px;
    }
    
    .swiperOutsideContainer .swiper-button-next .el-button i,
    .swiperOutsideContainer .swiper-button-prev .el-button i {
        font-size: 14px;
    }
}

/* Merchant logo styling for featured items */
.merchant-logo-small {
    width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center !important;
    border: 1px solid #e0e0e0 !important;
    flex-shrink: 0 !important;
    background-color: #f8f9fa !important;
    display: block !important;
    max-width: 20px !important;
    max-height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
}

/* Ensure merchant name section has proper layout */
.swiperOutsideContainer .d-flex.align-items-center {
    align-items: center !important;
    flex-wrap: nowrap !important;
}

.swiperOutsideContainer .d-flex.align-items-center span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

/* Merchant link styling */
.merchant-link:hover {
    color: #007bff !important;
    text-decoration: none !important;
}

.merchant-link:hover .merchant-logo-small {
    border-color: #007bff !important;
}

.merchant-link {
    color: inherit !important;
    text-decoration: none !important;
}

/* Merchant card section in item modal */
.merchant-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.merchant-card-link {
    color: inherit !important;
    text-decoration: none !important;
    outline: none;
}
.merchant-card-link:hover .merchant-name {
    color: #7b61ff; /* lilac accent */
}
.merchant-card:hover {
    border-color: #e6e0ff;
    background: #faf8ff;
    box-shadow: 0 2px 6px rgba(123,97,255,0.08);
}
.merchant-card-link:hover .merchant-cta {
    color: #7b61ff;
}
.merchant-card-link:focus-visible {
    box-shadow: 0 0 0 3px rgba(123,97,255,0.25);
    border-radius: 10px;
}
.merchant-logo-lg {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
}
.merchant-name {
    font-weight: 600;
}
.merchant-cta { /* legacy, in case used elsewhere */
    font-size: 12px;
    color: #6c757d;
}
.merchant-cta-btn {
    display: inline-block;
    font-size: 12px;
    color: #7b61ff;
    background: #efeaff;
    border-radius: 999px;
    padding: 3px 8px;
    line-height: 1;
    margin-top: 2px;
}
.merchant-card-link:hover .merchant-cta-btn {
    background: #e5ddff;
}
.merchant-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #f1f3f5;
    color: #495057;
}
.merchant-card:hover .merchant-arrow {
    background: #eee9ff;
    color: #7b61ff;
}

.item-modal-footer .add_to_cart {
    position: relative;
    border: none !important;
    background: linear-gradient(135deg, #8a6bff 0%, #7b61ff 60%, #6f5cf1 100%) !important;
    color: #fff !important;
    border-radius: 16px !important;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 8px 18px rgba(123, 97, 255, 0.25), 0 2px 6px rgba(0,0,0,0.05);
    transition: transform 120ms ease, box-shadow 200ms ease, filter 120ms ease;
}
.item-modal-footer .add_to_cart:hover:not([disabled]) {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(123, 97, 255, 0.28), 0 4px 10px rgba(0,0,0,0.06);
    filter: brightness(1.02);
}
.item-modal-footer .add_to_cart:active:not([disabled]) {
    transform: translateY(0);
    box-shadow: 0 6px 14px rgba(123, 97, 255, 0.22), 0 2px 6px rgba(0,0,0,0.06);
    filter: brightness(0.98);
}
.item-modal-footer .add_to_cart:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.35), 0 8px 18px rgba(123, 97, 255, 0.25);
}
.item-modal-footer .add_to_cart[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
    filter: grayscale(10%);
}
.item-modal-footer .add_to_cart .label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.item-modal-footer .add_to_cart .item-summary {
    /* Make the price pill pop over the lilac gradient */
    background: rgba(255, 255, 255, 0.18);
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: inset 0 -1px 0 rgba(255,255,255,0.15), 0 1px 2px rgba(0,0,0,0.06);
}
/* Loader alignment over button when loading */
.item-modal-footer .add_to_cart.loading .circle-loader {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
}

/* Quantity group styling */
.item-modal-footer .quantity {
    background: #f7f7fb;
    border-radius: 14px;
    padding: 6px;
    height: 52px;
    align-items: center;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 1px 2px rgba(0,0,0,0.03);
}
.item-modal-footer .quantity .qty {
    min-width: 36px;
    text-align: center;
    font-weight: 700;
    color: #2b2d42;
}
.item-modal-footer .quantity .qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #ecebfd;
    color: #7b61ff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    transition: transform 120ms ease, box-shadow 180ms ease, background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.item-modal-footer .quantity .qty-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(123,97,255,0.18), 0 2px 6px rgba(0,0,0,0.06);
    background: #f7f4ff;
    border-color: #dfd8ff;
}
.item-modal-footer .quantity .qty-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(123,97,255,0.16), 0 1px 3px rgba(0,0,0,0.06);
    background: #efeaff;
}
.item-modal-footer .quantity .qty-btn i {
    font-size: 18px;
}
.item-modal-footer .quantity .qty-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .item-modal-footer .add_to_cart,
    .item-modal-footer .quantity .qty-btn {
        transition: none;
    }
}

/* Size selection buttons (price buttons) */
.choose-sizex {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.choose-sizex .btn {
    border-radius: 12px !important;
    border: 1px solid #ecebfd !important;
    background: #ffffff !important;
    color: #2b2d42 !important;
    padding: 8px 12px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: transform 120ms ease, box-shadow 180ms ease, background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.choose-sizex .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(123,97,255,0.14), 0 2px 6px rgba(0,0,0,0.06);
    border-color: #dfd8ff !important;
    background: #f9f7ff !important;
}
.choose-sizex .btn.active,
.choose-sizex .btn:active,
.choose-sizex .btn.active:focus,
.choose-sizex .btn:focus {
    color: #6f5cf1 !important;
    background: #efeaff !important;
    border-color: #cfc5ff !important;
    box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.25);
}
.choose-sizex .btn input[type="radio"] {
    display: none;
}