.checkout-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
}

.checkout-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: start;
    overflow: visible;
}

/* ===========================
   LEFT SIDE - CART & FORM
   =========================== */
.checkout-left {
    overflow: visible;
}

.checkout-left h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 32px;
}

.checkout-left h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    margin-top: 40px;
}

.checkout-left h2:first-of-type {
    margin-top: 32px;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 80px 20px;
    background: #fafafa;
    border-radius: 8px;
}

.empty-cart svg {
    margin: 0 auto 24px;
    opacity: 0.3;
}

.empty-cart h2 {
    font-size: 24px;
    margin-bottom: 12px;
}

.empty-cart p {
    font-size: 14px;
    color: #666;
    margin-bottom: 24px;
}

.btn-continue-shopping {
    display: inline-block;
    background: #000;
    color: #fff;
    padding: 14px 32px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.btn-continue-shopping:hover {
    background: #1a1a1a;
}

.btn-continue-shopping:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

/* Cart Items */
.cart-items {
    border-top: 1px solid #e5e5e5;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 20px;
    padding: 24px 0;
    border-bottom: 1px solid #e5e5e5;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    background: #fafafa;
    border-radius: 6px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item-name {
    font-size: 16px;
    font-weight: 600;
}

.cart-item-options {
    font-size: 14px;
    color: #666;
}

.cart-item-options span {
    margin-right: 16px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.qty-btn {
    width: 32px;
    height: 32px;
    border: 1.5px solid #d4d4d4;
    background: #fff;
    border-radius: 4px;
    font-family: inherit;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    border-color: #000;
}

.qty-btn:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.qty-value {
    font-size: 14px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.cart-item-remove {
    background: none;
    border: none;
    font-family: inherit;
    color: #666;
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 8px;
    padding: 0;
    transition: color 0.2s ease;
}

.cart-item-remove:hover {
    color: #000;
}

.cart-item-remove:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.cart-item-right {
    text-align: right;
}

.cart-item-price {
    font-size: 18px;
    font-weight: 600;
}

/* ===========================
   CHECKOUT FORM
   =========================== */
.checkout-form {
    margin-top: 40px;
    overflow: visible;
}

.form-group {
    margin-bottom: 16px;
    position: relative;
    overflow: visible;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row-2 {
    grid-template-columns: 1fr 1fr;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #d4d4d4;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
    border-color: #000;
}

.form-group input::placeholder,
.form-group select {
    color: #666;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23666' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 32px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    margin-top: 2px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"]:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.checkbox-group label {
    font-weight: 400;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    cursor: pointer;
}

.field-info {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    cursor: help;
    transition: color 0.2s ease;
}

.field-info:hover {
    color: #666;
}

.field-info:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.field-info svg {
    display: block;
}

/* Tooltip */
.field-info::before {
    content: attr(aria-label);
    position: absolute;
    bottom: calc(100% + 12px);
    right: 0;
    background: #1a1a1a;
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.4;
    white-space: normal;
    width: 200px;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    z-index: 10000;
    font-weight: 400;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.field-info::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 6px);
    right: 8px;
    border: 6px solid transparent;
    border-top-color: #1a1a1a;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    z-index: 10000;
}

.field-info:hover::before,
.field-info:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Stripe Notice */
.stripe-notice {
    margin-top: 32px;
    padding: 16px 20px;
    background: #f5f5f5;
    border-radius: 8px;
    border-left: 4px solid #635bff;
}

.stripe-notice p {
    font-size: 14px;
    color: #666;
    margin: 0;
    font-weight: 500;
}

/* Shipping Method Section */
.shipping-method-section {
    margin-top: 24px;
    margin-bottom: 32px;
}

.shipping-option {
    border: 1.5px solid #d4d4d4;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease;
    margin-bottom: 12px;
}

.shipping-option:hover {
    border-color: #999;
}

.shipping-option.selected {
    border-color: #000;
    background: #fafafa;
}

.shipping-radio input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.shipping-radio input[type="radio"]:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.shipping-label {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
}

.shipping-name {
    font-weight: 500;
}

.shipping-price {
    font-weight: 700;
    color: #000;
}

/* ===========================
   RIGHT SIDE - ORDER SUMMARY
   =========================== */
.checkout-right {
    position: sticky;
    top: 100px;
}

.order-summary {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 32px;
}

.order-summary h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    font-size: 15px;
}

.summary-row span:first-child {
    color: #666;
}

.summary-row span:last-child {
    font-weight: 600;
}

.free-shipping {
    color: #000 !important;
    font-weight: 700 !important;
}

.summary-divider {
    height: 1px;
    background: #e5e5e5;
    margin: 20px 0;
}

.summary-total {
    font-size: 18px;
    margin-bottom: 24px;
}

.summary-total span {
    font-weight: 700;
    color: #000;
}

.btn-checkout {
    width: 100%;
    background: #000;
    color: #fff;
    padding: 16px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-bottom: 24px;
}

.btn-checkout:hover {
    background: #1a1a1a;
}

.btn-checkout:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.btn-checkout:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.billing-agreement {
    text-align: center;
    margin-bottom: 24px;
}

.billing-agreement p {
    font-size: 12px;
    color: #666;
    line-height: 1.5;
}

.billing-agreement a {
    color: #000;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.billing-agreement a:hover,
.billing-agreement a:focus {
    color: #666;
}

.billing-agreement a:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.secure-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.secure-checkout svg {
    color: #00C851;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 968px) {
    .checkout-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .checkout-right {
        position: static;
    }

    .order-summary {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .checkout-main {
        padding: 24px 16px;
    }

    .checkout-left h1 {
        font-size: 26px;
        margin-bottom: 24px;
    }

    .checkout-left h2 {
        font-size: 18px;
        margin-bottom: 16px;
        margin-top: 32px;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 16px;
        padding: 20px 0;
    }

    .cart-item-image {
        width: 80px;
        height: 80px;
    }

    .cart-item-right {
        grid-column: 2;
        text-align: left;
        margin-top: 12px;
    }

    .cart-item-name {
        font-size: 15px;
    }

    .cart-item-price {
        font-size: 16px;
    }

    .form-row,
    .form-row-2 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .empty-cart {
        padding: 60px 20px;
    }

    .field-info::before {
        width: 180px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .checkout-left h1 {
        font-size: 22px;
    }

    .cart-item {
        grid-template-columns: 70px 1fr;
    }

    .cart-item-image {
        width: 70px;
        height: 70px;
    }

    .order-summary {
        padding: 20px;
    }

    .field-info::before {
        width: 160px;
        font-size: 12px;
        padding: 8px 12px;
        right: -8px;
    }
    
    .field-info::after {
        right: 0;
    }
}