/* ============================================
   SHOPPING CART - PIXEL PERFECT FINAL MATCH
   Reference: user screenshots
   IMPORTANT: This overrides shared.css theme rules
   ============================================ */

/* ============================================
   BASKET POPUP — FORCE VISIBILITY OVERRIDES
   ============================================ */
.popup.basket-popup {
    z-index: 99999 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.8) !important;
    display: block !important;
    overflow: hidden !important;
}

.popup.basket-popup .popup-scroll-cont {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-end !important;
    min-height: 100% !important;
    height: 100% !important;
    padding: 0 !important;
}

.popup.basket-popup .popup-content.basket-popup-content {
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    max-width: 440px !important;
    width: 100% !important;
}

/* Outer wrapper */
.sc-outer {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 20px 24px;
}

/* Main container */
.sc-container,
.basket-popup-content {
    width: 100%;
    max-width: 440px !important;
    height: 90vh;
    background: #0c0c0c !important;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.95);
    padding: 0 !important;
}

/* Fix Tebex core CSS hiding the basket if accessed via full URL */
.site-content .basket {
    display: flex !important;
}

/* ===== RESET THEME BASKET STYLES ===== */
/* shared.css sets padding: 50px on .basket .basket-header - kill it */
.sc-container .basket-header,
.sc-container .basket .basket-header,
.basket-popup-content .basket-header {
    padding: 16px 20px !important;
    background: #0c0c0c !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    margin: 0 !important;
}

/* shared.css sets gap: 20px and padding on basket-items - kill it */
.sc-container .basket-items,
.sc-container .basket .basket-items,
.basket-popup-content .basket-items {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 0 !important;
}

/* shared.css sets padding and background on basket-item - kill it */
.sc-container .basket-item,
.sc-container .basket .basket-item,
.basket-popup-content .basket-item {
    padding: 0 !important;
    background: transparent !important;
    gap: 0 !important;
    width: 100% !important;
}

/* shared.css sets flex:1 on basket-content - preserve but fix top padding */
.sc-container .basket-content,
.basket-popup-content .basket-content {
    flex: 1 !important;
    overflow-y: auto !important;
    background: #0c0c0c !important;
    padding: 8px 16px 12px !important;
}

/* ===== OUR HEADER ===== */
.sc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px !important;
    background: #0c0c0c !important;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    /* Divider line */
}

.sc-header-inner {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sc-icon {
    width: 42px;
    height: 42px;
    background: #191919;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    flex-shrink: 0;
}

.sc-titles {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sc-title {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin: 0;
}

.sc-subtitle {
    font-size: 12px;
    font-weight: 600;
}

.sc-num {
    color: #ef4444;
    font-weight: 800;
}

.sc-unit {
    color: #6b7280;
}

/* ===== BODY ===== */
.sc-body {
    flex-grow: 1;
    overflow-y: auto;
    background: #0c0c0c;
    padding: 8px 16px 12px;
    scrollbar-width: none;
}

.sc-body::-webkit-scrollbar {
    display: none;
}

.sc-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ===== PRODUCT CARD ===== */
.sc-card {
    background: #181818;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.sc-img {
    width: 110px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #1a1a1a;
}

.sc-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.sc-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding-right: 44px;
    min-width: 0;
}

.sc-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
    margin: 0;
}

.sc-name a {
    color: inherit;
    text-decoration: none;
}

.sc-price {
    font-size: 12px;
    font-weight: 700;
    color: #4b5563;
    text-transform: uppercase;
}

/* ===== TRASH BUTTON ===== */
.sc-del {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    background: #ef4444 !important;
    border-radius: 8px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    text-decoration: none;
    font-size: 13px;
}

.sc-del:hover {
    background: #dc2626 !important;
}

/* ===== FOOTER ===== */
.sc-foot,
.basket-popup-content .basket-checkout {
    padding: 20px 24px 26px !important;
    background: #0c0c0c !important;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0 !important;
}

.sc-totals {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sc-row-sub,
.sc-row-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sc-sub-label {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
}

.sc-sub-val {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
}

.sc-tot-label {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.sc-tot-val {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
}

/* ===== BUTTONS ===== */
.sc-btns {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sc-btn-pay {
    width: 100%;
    height: 48px;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.sc-btn-back {
    width: 100%;
    height: 44px;
    background: #141414;
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}