/* =====================================================
   MINI CART NOTIFICATION STYLES - HONGO EXACT MATCH
   ===================================================== */

/* ===== CART CONTAINER ===== */
.cart-notification {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    z-index: 9999 !important;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cart-notification.active {
    right: 0;
}

/* ===== OVERLAY ===== */
.cart-notification__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: -1;
}

.cart-notification.active .cart-notification__overlay {
    opacity: 1;
    visibility: visible;
}

/* ===== CART CONTENT ===== */
.cart-notification__content {
    position: relative;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 2 !important;
}

/* ===== CART HEADER ===== */
.cart-title {
    display: flex;
    align-items: center;
    padding: 25px 70px 25px 30px;
    border-bottom: 1px solid #e5e5e5;
    background: #f3e9e0;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.cart-title h4 {
    font-weight: 500;
    margin: 0;
    color: #232323;
    font-family: 'Marcellus', serif;
    font-size: 18px;
}

/* ===== CART COUNT DISPLAY ===== */
#miniCartcount.cart-count {
    margin-left: 12px;
    background: #232323;
    text-transform: uppercase;
    font-size: 11px;
    padding: 6px 14px;
    color: #fff !important;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

#miniCartcount .cart-count-number {
    font-weight: 700;
    color: #fff !important;
    display: inline;
}

#miniCartcount .cart-label {
    font-weight: 600;
    color: #fff !important;
    display: inline;
}

/* ===== CLOSE BUTTON ===== */
.cart-close-icon {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    color: #232323;
    transition: all 0.3s ease;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20 !important;
}

.cart-close-icon:hover {
    opacity: 0.7;
    transform: translateY(-50%) rotate(90deg);
}

/* ===== PROGRESS BAR ===== */
.mini-cart-progress {
    height: 1px;
    background: #e5e5e5;
    flex-shrink: 0;
}

/* ===== FREE SHIPPING GOAL - HONGO EXACT MATCH ===== */
.cart-goal {
    padding: 25px 45px;
    background: #fafafa;
    border-bottom: 1px solid #e5e5e5;
    flex-shrink: 0;
    overflow: visible !important;
}

.cart-goal-msg {
    line-height: 1.6;
    color: #666;
    margin-bottom: 15px;
    font-size: 15px;
    text-align: left;
    font-family: 'Inter', sans-serif;
}

.cart-goal-msg span {
    font-weight: 600;
    color: #232323;
}

.cart-goal__inner {
    position: relative;
    overflow: visible !important;
    padding-top: 5px;
}

/* Progress Bar Container - MUST allow overflow for badge below */
.cart-goal__bar {
    background-color: #e5e5e5;
    height: 6px;
    border-radius: 10px;
    position: relative;
    overflow: visible !important;
    width: 100%;
}

/* Progress Bar Fill */
.cart-goal__bar > span {
    background-image: linear-gradient(90deg, #ff7800 0%, #ffcd06 100%);
    border-radius: 10px;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    display: block;
    height: 6px;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 100%;
    overflow: visible !important;
}

/* CRITICAL: Badge positioning BELOW the progress bar like Hongo */
.cart-goal__bar .goal-badge {
    position: absolute!important;
    top: 100%!important;
    margin-top: -17px!important;
    transform: translateX(-50%);
    background-color: #232323;
    color: #fff;
    padding: 0;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    min-width: 55px;
    height: 28px;
    white-space: nowrap;
    font-family: 'Inter', sans-serif;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: left 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.cart-goal__bar .goal-badge::after {
    content: '%';
    margin-left: 1px;
}

/* No arrow needed for Hongo style */
.cart-goal__bar .goal-badge::before {
    display: none;
}

@media (max-width: 576px) {
    .cart-goal {
        padding: 20px 20px 30px;
    }
    
    .cart-goal__bar .goal-badge {
        min-width: 50px;
        height: 26px;
        padding: 5px 12px;
        font-size: 12px;
        margin-top: 6px;
    }
}

/* ===== CONFETTI CONTAINER ===== */
.cart-notification__content {
    position: relative;
    overflow: hidden;
}

#confetti-container {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 1000 !important;
    overflow: hidden !important;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: 0;
    will-change: transform, opacity;
}

/* Natural confetti fall - matching Hongo's smooth animation */
@keyframes confettiFall {
    0% { 
        transform: translateY(-10px) translateX(0) rotate(0deg);
        opacity: 1;
    }
    25% {
        opacity: 1;
    }
    50% {
        opacity: 0.9;
    }
    75% {
        opacity: 0.6;
    }
    100% { 
        transform: translateY(calc(100vh + 20px)) translateX(var(--drift)) rotate(720deg);
        opacity: 0;
    }
}

/* ===== CART ITEMS WRAPPER ===== */
.mini-cart-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
}

.cart-notification-products {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cart-notification-product {
    display: flex;
    padding: 20px 30px;
    border-bottom: 1px solid #e5e5e5;
    gap: 15px;
    transition: background 0.2s;
}

.cart-notification-product:hover {
    background: #fafafa;
}

.cart-notification-product .product-image {
    flex-shrink: 0;
    width: 90px;
    height: 90px;
    overflow: hidden;
    border-radius: 0;
    background: #f5f5f5;
    border: 1px solid #e5e5e5;
}

.cart-notification-product .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.cart-notification-product:hover .product-image img {
    transform: scale(1.05);
}

.cart-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.product-inner {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.product-name {
    font-size: 16px;
    font-weight: 500;
    color: #232323;
    text-decoration: none;
    line-height: 1.5;
    margin-right: 10px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    letter-spacing: 0.3px;
    font-family: 'Inter', sans-serif;
}

.product-name:hover {
    color: #c09671;
}

.remove {
    flex-shrink: 0;
    color: #999;
    font-size: 16px;
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 20px;
    height: 20px;
}

.remove:hover {
    color: #232323;
}

.quantity-wrap {
    display: flex;
    align-items: center;
    margin-top: auto;
    gap: 15px;
}

.amount {
    font-size: 14px;
    font-weight: 500;
    color: #232323;
    flex: 1;
    font-family: 'Inter', sans-serif;
}

.quantity {
    display: flex;
    align-items: center;
    border: 2px solid #e9d6c6;
    border-radius: 0;
    background: #fff;
}

.quantity-button {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-button:hover:not(:disabled) {
    color: #232323;
    background: #fafafa;
}

.quantity-button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.quantity-minus, .quantity-plus {
    border: none;
    background: #fff;
}

.quantity-input {
    width: 40px;
    height: 32px;
    border: none;
    border-left: 1px solid #e5e5e5;
    border-right: 1px solid #e5e5e5;
    color: #232323;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    background: #fff;
    -webkit-appearance: none;
    -moz-appearance: textfield;
    font-family: 'Inter', sans-serif;
    padding: 0;
    line-height: 32px;
}

.quantity-input:focus {
    outline: none;
    background: #fff;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ===== EMPTY CART ===== */
.cart-empty {
    text-align: center;
    padding: 60px 30px;
    flex: 1;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cart-notification.cart-is-empty .cart-empty {
    display: flex !important;
}

.cart-empty i {
    font-size: 50px;
    color: #322e2a;
    margin-bottom: 20px;
    display: block;
}

.cart-empty h6 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #232323;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Marcellus', serif;
}

.cart-empty .btn-hongo {
    padding: 14px 30px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 0;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    font-family: 'Inter', sans-serif;
    background: #232323;
    color: #fff;
    border: 2px solid #232323;
}

.cart-empty .btn-hongo:hover {
    background: #fff;
    color: #232323;
}

/* Hide sections when cart is empty */
.cart-notification.cart-is-empty #miniCartcount,
.cart-notification.cart-is-empty .cart-goal,
.cart-notification.cart-is-empty .cart-notification-ymal,
.cart-notification.cart-is-empty .mini-cart-bottom {
    display: none !important;
}

.cart-notification.cart-is-empty .mini-cart-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== YOU MAY ALSO LIKE ===== */
.cart-notification-ymal {
    padding: 25px 20px;
    background: #f9f1ea;
    border-top: 1px solid #e5e5e5;
    display: none;
}

.cart-notification:not(.cart-is-empty) .cart-notification-ymal {
    display: block;
}

.ymal-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    color: #232323;
    text-align: center;
    font-family: 'Marcellus', serif;
}

.ymal-swiper {
    width: 100%;
    padding-bottom: 35px;
    overflow: hidden;
}

.ymal-swiper .swiper-pagination {
    bottom: 0 !important;
}

.ymal-swiper .swiper-pagination-bullet {
    background: #232323;
    opacity: 0.3;
    width: 8px;
    height: 8px;
    margin: 0 4px;
    transition: all 0.3s;
}

.ymal-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    width: 20px;
    border-radius: 4px;
}

.ymal-product {
    background: #fff;
    border: 1px solid #e5e5e5;
    padding: 12px;
    transition: all 0.3s;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 4px;
}

.ymal-product:hover {
    border-color: #232323;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.ymal-product img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    margin-bottom: 12px;
    flex-shrink: 0;
    border-radius: 2px;
    transition: transform 0.3s;
}

.ymal-product:hover img {
    transform: scale(1.05);
}

.ymal-product-title {
    font-size: 13px;
    font-weight: 500;
    color: #232323;
    margin-bottom: 8px;
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex: 1;
    min-height: 36px;
}

.ymal-product-price {
    font-size: 15px;
    font-weight: 600;
    color: #232323;
    font-family: 'Inter', sans-serif;
    margin-top: auto;
}

/* ===== CART BOTTOM ===== */
.mini-cart-bottom {
    border-top: 1px solid #e5e5e5;
    background: #f3e9e0;
    flex-shrink: 0;
}

/* ===== ADDONS ===== */
.cart-notification-addons {
    padding: 0 30px;
    background: #f3e9e0;
}

.addon-icon {
    display: flex;
    gap: 0;
    justify-content: space-between;
}

.addon-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 8px;
    border: 0 !important;
    border-right: 1px solid #e9d6c6 !important;
    border-radius: 0;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 13px !important;
    color: #322e2a;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.addon-btn:last-child {
    border-right: 0 !important;
}

.addon-btn:hover {
    color: #232323;
    background: rgba(0, 0, 0, 0.05);
}

.addon-btn.active {
    background: #232323;
    color: #fff;
}

.addon-btn i {
    font-size: 20px;
    margin-bottom: 8px;
    color: #232323;
    display: block;
}

.addon-btn.active i {
    color: #fff;
}

.addon-content {
    display: none;
    padding: 20px 0 0;
    animation: slideDown 0.3s ease;
}

.addon-content.active {
    display: block;
}

.addon-content .popup-icon {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 12px;
    font-weight: 600;
    color: #232323;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
}

.addon-content .popup-icon i {
    font-size: 18px;
}

.addon-content textarea,
.addon-content input[type="text"],
.addon-content select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e5e5e5;
    border-radius: 0;
    font-size: 13px;
    margin-bottom: 12px;
    font-family: 'Inter', sans-serif;
    color: #232323;
    background: #fff;
}

.addon-content textarea:focus,
.addon-content input:focus,
.addon-content select:focus {
    outline: none;
    border-color: #232323;
}

.addon-content .field {
    margin-bottom: 15px;
}

.addon-content .field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #232323;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Inter', sans-serif;
}

.addon-action {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.btn-save {
    padding: 14px 20px;
    border-radius: 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Inter', sans-serif;
    background: #232323;
    color: #fff;
}

.btn-save:hover {
    background: #000;
}

/* ========== CRITICAL FIXES ========== */

/* FIX: Body scroll lock */
body.cart-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
}

/* FIX: Progress bar badge positioning - MUST allow overflow */
.cart-goal__bar,
.cart-goal__bar > span {
    overflow: visible !important;
}

/* FIX: Shipping estimate container */
#shipping-estimate {
    margin-top: 15px;
}

.shipping-result {
    padding: 15px;
    border-radius: 4px;
    font-size: 14px;
}

/* FIX: Gift wrap styles */
.gift-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin-bottom: 15px;
}

.gift-options input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

#gift-message {
    width: 100%;
    min-height: 80px;
    padding: 12px 15px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    resize: vertical;
}

#gift-wrap-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 1px dashed #e5e5e5;
    margin-top: 10px;
}

/* Toast animations */
@keyframes slideIn {
    from { transform: translateX(400px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(400px); opacity: 0; }
}

.btn-cancel {
    background: none;
    border: none;
    color: #666;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    text-align: center;
    padding: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.btn-cancel:hover {
    color: #232323;
}

/* ===== TOTALS ===== */
.cart-notification-totals {
    padding: 15px 30px 0;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-subtotal label {
    margin: 0;
}

.cart-subtotal-amount {
    font-size: 20px;
    font-family: 'Inter', sans-serif;
}

/* ===== AGREEMENT ===== */
.cart-agreement {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 20px 30px;
    font-size: 14px;
    color: #666;
    background: #f3e9e0;
    font-family: 'Inter', sans-serif;
}

.cart-agreement input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.cart-agreement label {
    margin: 0;
    line-height: 1.6;
    cursor: pointer;
}

.cart-agreement a {
    color: #232323;
    text-decoration: underline;
    font-weight: 600;
}

.cart-agreement a:hover {
    color: #c09671;
}

/* ===== BUTTONS ===== */
.cart-notification-buttons {
    padding: 10px 30px 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-notification-buttons .btn-hongo,
.cart-notification-buttons a {
    padding: 16px 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 0;
    text-align: center;
    transition: all 0.3s;
    text-decoration: none;
    border: 2px solid #232323;
    display: block;
    font-family: 'Inter', sans-serif;
}

.btn-hongo-black,
#mini-cart-checkout {
    background: #232323;
    color: #fff !important;
}

.btn-hongo-black:hover:not(:disabled),
#mini-cart-checkout:hover:not(:disabled) {
    background: #fff;
    color: #232323 !important;
}

.btn-hongo-black:disabled,
#mini-cart-checkout:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-hongo-outline {
    background: transparent;
    color: #232323;
}

.btn-hongo-outline:hover {
    background: #232323;
    color: #fff;
}

/* ===== ANIMATIONS ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== SCROLLBAR ===== */
.mini-cart-wrapper::-webkit-scrollbar {
    width: 5px;
}

.mini-cart-wrapper::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.mini-cart-wrapper::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 10px;
}

.mini-cart-wrapper::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* ===== LOADING STATE ===== */
.mini-cart-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 576px) {
    .cart-notification {
        max-width: 100%;
    }
    
    .cart-title {
        padding: 15px 60px 15px 20px;
    }
    
    .cart-title h4 {
        font-size: 16px;
    }
    
    #miniCartcount.cart-count {
        font-size: 10px;
        padding: 5px 10px;
        margin-left: 10px;
    }
    
    .cart-goal,
    .cart-notification-product,
    .cart-notification-addons,
    .cart-notification-totals,
    .cart-notification-ymal {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .cart-notification-buttons {
        padding: 15px 20px 20px;
    }
    
    .cart-notification-product .product-image {
        width: 75px;
        height: 75px;
    }
    
    .ymal-product img {
        height: 120px;
    }
}

@media (max-width: 360px) {
    .cart-notification-product .product-image {
        width: 70px;
        height: 70px;
    }
    
    .product-name {
        font-size: 14px;
    }
    
    .amount {
        font-size: 13px;
    }
    
    .quantity-button {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .quantity-input {
        width: 35px;
        height: 28px;
    }
    
    .ymal-product img {
        height: 100px;
    }
}