/* ============================================
   CART BUTTON & DROPDOWN
   ============================================ */

.btn-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(120deg, #DC2626, #F97316);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
}

.btn-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.35);
    color: white;
}

.cart-count {
    display: none;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: white;
    color: #DC2626;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    position: absolute;
    top: -6px;
    right: -6px;
}

/* Cart Wrapper */
.cart-wrapper {
    position: relative;
}

/* Cart Dropdown */
.cart-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 340px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border: 1.5px solid rgba(0, 0, 0, 0.06);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s ease;
}

.cart-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.cart-dropdown::before {
    content: '';
    position: absolute;
    top: -7px;
    right: 24px;
    width: 14px;
    height: 14px;
    background: white;
    border-left: 1.5px solid rgba(0, 0, 0, 0.06);
    border-top: 1.5px solid rgba(0, 0, 0, 0.06);
    transform: rotate(45deg);
}

/* Dropdown Header */
.cart-dropdown-header {
    padding: 16px 18px;
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-dropdown-header h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.cart-dropdown-header span {
    font-size: 12px;
    color: var(--text-gray);
}

/* Empty Cart */
.cart-dropdown-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 20px;
    text-align: center;
    gap: 12px;
}

.cart-dropdown-empty i {
    font-size: 40px;
    color: #E5E7EB;
}

.cart-dropdown-empty p {
    font-size: 14px;
    color: var(--text-gray);
    margin: 0;
}

/* Cart Items */
.cart-dropdown-items {
    max-height: 260px;
    overflow-y: auto;
    padding: 10px 0;
}

.cart-dropdown-items::-webkit-scrollbar {
    width: 4px;
}

.cart-dropdown-items::-webkit-scrollbar-track {
    background: transparent;
}

.cart-dropdown-items::-webkit-scrollbar-thumb {
    background: #E5E7EB;
    border-radius: 4px;
}

.cart-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    transition: background 0.2s;
}

.cart-dropdown-item:hover {
    background: #FAFAFA;
}

.cart-item-img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    overflow: hidden;
    background: #FFF5F2;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.cart-item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-meta {
    font-size: 12px;
    color: var(--text-gray);
    font-weight: 500;
}

.cart-item-remove {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(220, 38, 38, 0.06);
    border-radius: 8px;
    color: #DC2626;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cart-item-remove:hover {
    background: #DC2626;
    color: white;
}

/* Dropdown Footer */
.cart-dropdown-footer {
    padding: 14px 18px;
    border-top: 1.5px solid rgba(0, 0, 0, 0.05);
}

.cart-dropdown-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.cart-dropdown-total span:first-child {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.cart-dropdown-total span:last-child {
    font-size: 17px;
    font-weight: 800;
    background: linear-gradient(120deg, #DC2626, #F97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-go-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: linear-gradient(120deg, #DC2626, #F97316);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-go-cart:hover {
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.3);
    color: white;
    transform: translateY(-1px);
}

/* Mobile Cart Button */
.btn-cart-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: linear-gradient(120deg, #DC2626, #F97316);
    color: white !important;
    text-decoration: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 15px;
    position: relative;
}

.btn-cart-mobile .cart-count {
    position: static;
    width: 22px;
    height: 22px;
}

/* ============================================
   NOTIFICATION
   ============================================ */

.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 24px;
    background: #16A34A;
    color: white;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 8px 24px rgba(22, 163, 74, 0.3);
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-notification.show {
    transform: translateX(0);
}

.cart-notification i {
    font-size: 16px;
}

/* ============================================
   CART PAGE
   ============================================ */

.cart-page {
    padding: 80px 0;
    background: linear-gradient(180deg, #FFFFFF 0%, #FFF9F5 100%);
    min-height: 60vh;
}

.cart-page-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Cart Items Table */
.cart-items-card {
    background: white;
    border-radius: 20px;
    border: 1.5px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.cart-items-header {
    padding: 20px 24px;
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-items-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0;
}

.btn-clear-cart {
    font-size: 13px;
    color: #DC2626;
    background: none;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    transition: opacity 0.2s;
}

.btn-clear-cart:hover {
    opacity: 0.7;
}

/* Cart Item Row */
.cart-page-items {
    padding: 8px 0;
}

.cart-page-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: background 0.2s;
}

.cart-page-item:last-child {
    border-bottom: none;
}

.cart-page-item:hover {
    background: #FAFAFA;
}

.cart-page-item-img {
    width: 68px;
    height: 68px;
    border-radius: 14px;
    overflow: hidden;
    background: #FFF5F2;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.cart-page-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-page-item-info {
    flex: 1;
    min-width: 0;
}

.cart-page-item-info h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 3px 0;
}

.cart-page-item-info p {
    font-size: 13px;
    color: var(--text-gray);
    margin: 0;
}

/* Quantity Control */
.qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.qty-btn {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #FAFAFA;
    color: var(--text-dark);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}

.qty-btn:hover {
    background: #F3F4F6;
}

.qty-value {
    width: 36px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-dark);
    background: white;
    border: none;
    border-left: 1.5px solid rgba(0, 0, 0, 0.1);
    border-right: 1.5px solid rgba(0, 0, 0, 0.1);
    height: 34px;
    line-height: 34px;
}

.cart-page-item-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
    min-width: 90px;
    text-align: right;
    flex-shrink: 0;
}

.cart-page-item-remove {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(220, 38, 38, 0.06);
    border-radius: 8px;
    color: #DC2626;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.cart-page-item-remove:hover {
    background: #DC2626;
    color: white;
}

/* Empty Cart Page */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.cart-empty i {
    font-size: 60px;
    color: #E5E7EB;
    margin-bottom: 16px;
}

.cart-empty h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.cart-empty p {
    font-size: 15px;
    color: var(--text-gray);
    margin-bottom: 24px;
}

.btn-shop-now {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: linear-gradient(120deg, #DC2626, #F97316);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
}

.btn-shop-now.btn-shop-now-sm {
    padding: 10px 24px;
    font-size: 13px;
    gap: 6px;
}

.btn-shop-now:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.3);
    color: white;
}

/* ============================================
   CHECKOUT FORM
   ============================================ */

.checkout-card {
    background: white;
    border-radius: 20px;
    border: 1.5px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    position: sticky;
    top: 100px;
}

.checkout-header {
    padding: 20px 24px;
    border-bottom: 1.5px solid rgba(0, 0, 0, 0.05);
    background: linear-gradient(135deg, #FFF9F5, #FFF5F2);
}

.checkout-header h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 4px 0;
}

.checkout-header p {
    font-size: 13px;
    color: var(--text-gray);
    margin: 0;
}

.checkout-form {
    padding: 24px;
}

.checkout-form .form-group {
    margin-bottom: 16px;
}

.checkout-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.checkout-form label .required {
    color: #DC2626;
    margin-left: 2px;
}

.checkout-form input,
.checkout-form select,
.checkout-form textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    background: white;
    transition: all 0.3s ease;
    outline: none;
    box-sizing: border-box;
}

.checkout-form input:focus,
.checkout-form select:focus,
.checkout-form textarea:focus {
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.checkout-form input::placeholder,
.checkout-form textarea::placeholder {
    color: #9CA3AF;
}

.checkout-form textarea {
    resize: vertical;
    min-height: 70px;
}

.checkout-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Payment Info */
.payment-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(22, 163, 74, 0.06);
    border: 1.5px solid rgba(22, 163, 74, 0.15);
    border-radius: 12px;
    margin-bottom: 18px;
}

.payment-info i {
    font-size: 20px;
    color: #16A34A;
}

.payment-info span {
    font-size: 14px;
    font-weight: 600;
    color: #16A34A;
}

/* Order Summary */
.order-summary {
    padding: 16px;
    background: #FAFAFA;
    border-radius: 12px;
    margin-bottom: 18px;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 14px;
    color: var(--text-gray);
}

.order-summary-row.total {
    padding-top: 12px;
    margin-top: 8px;
    border-top: 1.5px solid rgba(0, 0, 0, 0.08);
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
}

.order-summary-row.total span:last-child {
    font-size: 20px;
    background: linear-gradient(120deg, #DC2626, #F97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Submit Button */
.btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 14px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.btn-checkout:hover {
    background: #22c55e;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
}

.btn-checkout i {
    font-size: 18px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 991px) {
    .cart-page-grid {
        grid-template-columns: 1fr;
    }

    .checkout-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-page {
        padding: 50px 0;
    }

    .cart-dropdown {
        width: 300px;
        right: -10px;
    }

    .cart-page-item {
        flex-wrap: wrap;
        gap: 12px;
        padding: 16px 18px;
    }

    .cart-page-item-price {
        min-width: auto;
    }

    .checkout-form .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .cart-dropdown {
        width: 280px;
        right: -40px;
    }

    .cart-dropdown::before {
        right: 50px;
    }

    .cart-page-item-img {
        width: 56px;
        height: 56px;
    }

    .cart-page-item-info h3 {
        font-size: 14px;
    }

    .checkout-form {
        padding: 18px;
    }
}
