/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f4f4f5;
    color: #000;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Layout */
.checkout-page {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px 10px 60px;
}

.checkout-header {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Box Containers */
.box-container {
    background-color: #fff;
    border: 1px solid #000;
    margin-bottom: 20px;
    padding: 16px;
}

.product-summary-box {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.totals-box {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    margin-bottom: 20px;
}

.checkout-form-box {
    /* Standard box */
}

/* Product Info */
.product-info-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 16px;
}

.product-image {
    position: relative;
    width: 48px;
    height: 48px;
    margin-right: 12px;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 1px solid #000;
    border-radius: 4px;
}

.qty-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #000;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-details {
    flex-grow: 1;
}

.product-details h3 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 2px;
    line-height: 1.3;
}

.creator-link {
    font-size: 12px;
    color: #6b7280;
    text-decoration: underline;
    display: block;
    margin-bottom: 8px;
}

.btn-remove {
    background: none;
    border: 1px solid #000;
    font-size: 11px;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 4px;
    color: #374151;
}

.product-price {
    font-weight: 600;
    font-size: 14px;
    margin-left: 10px;
}

/* Dividers */
.divider {
    height: 1px;
    background-color: #000;
    margin: 16px 0;
}

/* Toggle */
.gift-toggle {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}

.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    margin-right: 10px;
}
.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc; /* Default gray for off */
    transition: .4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}
.switch input:checked + .slider {
    background-color: #50317d;
}
.switch input:focus + .slider {
    box-shadow: 0 0 1px #50317d;
}
.switch input:checked + .slider:before {
    transform: translateX(16px);
}
.slider.round {
    border-radius: 20px;
}
.slider.round:before {
    border-radius: 50%;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #111827;
}

.form-group input, 
.form-group textarea, 
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #000;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    background-color: #fff;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #000;
}

.form-group input:disabled,
.form-group textarea:disabled {
    background-color: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

/* Totals */
.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 10px;
    color: #374151;
}

.total-row:last-child {
    margin-bottom: 0;
}

.discount-row {
    align-items: center;
}

.discount-label {
    display: flex;
    align-items: center;
}

.tag {
    background-color: #f3f4f6;
    border: 1px solid #000;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
}

.discount-input-row {
    display: flex;
    margin-top: 12px;
}

.discount-input-row input {
    flex-grow: 1;
    padding: 8px 12px;
    border: 1px solid #000;
    border-right: none;
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    outline: none;
    font-size: 14px;
}

.discount-input-row button {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #000;
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
}

.final-total {
    font-weight: 700;
    font-size: 16px;
    color: #000;
}

.currency-dropdown {
    width: 100%;
    padding: 10px;
    appearance: none;
    background: url('data:image/svg+xml;utf8,<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>') no-repeat right 12px center;
    background-size: 16px;
    padding-right: 32px;
}

/* Pay With Section */
.pay-with-label {
    font-size: 14px;
    font-weight: 500;
    margin: 24px 0 12px;
}

.payment-methods-container {
    border: 1px solid #000;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.method-selector {
    padding: 14px 16px;
    background-color: #f9fafb;
    border-bottom: 1px solid #000;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
}
.method-selector i {
    margin-right: 10px;
    font-size: 16px;
    color: #6b7280;
}
.radio-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid #000;
    margin-right: 12px;
    display: inline-block;
    position: relative;
    background-color: transparent;
}
.method-selector.active {
    background-color: #fff;
    border-bottom: none;
}
.method-selector.active .radio-circle {
    border: 5px solid #000; 
}
.method-selector.active i {
    color: #000;
}

.billing-details-form {
    padding: 16px;
    background-color: #fff;
    border-top: 1px solid #000;
}

.redirect-notice {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid #000;
    border-radius: 4px;
    margin-bottom: 16px;
    background-color: #fff;
}
.redirect-notice i {
    margin-top: 2px;
    margin-right: 12px;
    color: #6b7280;
}
.redirect-notice p {
    font-size: 13px;
    color: #374151;
}

.btn-pay {
    width: 100%;
    background-color: #000;
    color: #fff;
    border: none;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
}

.security-text {
    font-size: 11px;
    color: #9ca3af;
    text-align: left;
    margin: 16px 0;
    line-height: 1.4;
}

.btn-continue-shopping {
    width: 100%;
    background-color: #fff;
    color: #000;
    border: 1px solid #000;
    padding: 14px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
}

/* Popup overlay */
.popup {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.popup-box {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.popup-box h3 { margin-bottom: 10px; font-weight: 600; }