
/* Checkout Page Redesign */

:root {
    --checkout-bg: #000000;
    --checkout-card-bg: #0b0b0b;
    --checkout-border: #1a1a1a;
    --checkout-text: #ffffff;
    --checkout-text-muted: #888888;
    --checkout-accent: #ffffff;
    --checkout-error: #ff4d4d;
    --checkout-input-bg: #1a1a1a;
    --checkout-input-border: #333333;
    --checkout-radius: 6px;
}

/* Base Body Style */
body.woocommerce-checkout {
    background-color: var(--checkout-bg) !important;
    color: var(--checkout-text) !important;
    font-family: 'Inter', 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

/* Hide standard Woodmart / Woo elements if they still persist */
.woocommerce-checkout h3#order_review_heading,
.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3,
.woocommerce-checkout .woocommerce-additional-fields h3,
.woocommerce-checkout .woocommerce-form-coupon-toggle,
.woocommerce-checkout .checkout_coupon.woocommerce-form-coupon {
    display: none !important;
}

/* Layout Container */
.checkout-container {
    max-width: 1200px;
    margin: 40px auto;
    display: flex;
    gap: 40px;
}

.checkout-left-col {
    flex: 1;
    min-width: 0;
}

.checkout-right-col {
    width: 420px;
    flex-shrink: 0;
}


.checkout-header h1 {
    font-size: 36px !important;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #fff;
    margin: 0;
}

.checkout-header .encrypted-badge {
    font-size: 10px;
    font-family: 'Inter';
    background: #000;
    border: 1px solid #303030;
    padding: 5px 12px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #b8b8b8;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Section Cards */
.checkout-section {
    background: var(--checkout-card-bg);
    border: 1px solid #414141;
    padding: 20px;
    border-radius: var(--checkout-radius);
    margin-bottom: 25px;
}

.checkout-section-title {
    font-size: 20px;
    font-family: 'Space Grotesk';
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 25px;
    color: var(--checkout-text);
    opacity: 0.9;
}

/* Form Styling */
.woocommerce-checkout .form-row {
    margin-bottom: 20px;
    padding: 0 !important;
    width: 100%;
}

.woocommerce-checkout .form-row label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--checkout-text-muted);
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.woocommerce-checkout .form-row input[type="text"],
.woocommerce-checkout .form-row input[type="email"],
.woocommerce-checkout .form-row input[type="tel"],
.woocommerce-checkout .form-row select {
    width: 100% !important;
    background: var(--checkout-input-bg) !important;
    border: 1px solid var(--checkout-input-border) !important;
    color: #fff !important;
    padding: 15px 20px !important;
    border-radius: var(--checkout-radius) !important;
    font-size: 14px !important;
    outline: none !important;
    transition: border-color 0.3s;
}

.woocommerce-checkout .form-row input:focus {
    border-color: #555 !important;
}

.woocommerce-checkout .form-row input::placeholder {
    color: #333 !important;
}

/* Grid Layouts for Address Field */
.address-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.address-grid-3 {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 20px;
}

/* Payment Methods List */
.payment-methods-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.payment-method-item {
    border: 1px solid var(--checkout-border);
    margin-bottom: 12px;
    border-radius: var(--checkout-radius);
    padding: 0;
    background: rgba(255,255,255,0.01);
    transition: all 0.3s;
}

.payment-method-item.active {
    border-color: #0070ba;
    background: rgba(0, 112, 186, 0.05);
}

.payment-method-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px 25px;
    cursor: pointer;
}

.payment-method-header input[type="radio"] {
    margin: 0 !important;
    width: 18px !important;
    height: 18px !important;
}

.payment-method-header label {
    flex: 1;
    margin: 0 !important;
    cursor: pointer;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #fff !important;
    text-transform: none !important;
}

.method-description-short {
    font-size: 11px !important;
    color: var(--checkout-text-muted) !important;
    margin-top: 2px;
    font-weight: 400 !important;
    text-transform: none !important;
}

.payment_box {
    background: rgba(0,0,0,0.3) !important;
    border-top: 1px solid var(--checkout-border);
    padding: 25px !important;
    font-size: 12px !important;
    color: #999 !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

/* Venmo specific box styling */
.payment_method_venmo .payment_box {
    background: rgba(0, 112, 186, 0.05) !important;
    border: 1px solid rgba(0, 112, 186, 0.2);
    border-radius: 4px;
    margin: 10px;
}

.payment_method_venmo h4 {
    color: #0070ba;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.payment_method_venmo ol {
    margin: 0;
    padding-left: 20px;
    color: #888;
}

/* Order Summary Column */
.order-summary-card {
    background: var(--checkout-card-bg);
    border: 1px solid #414141;
    padding: 20px;
    border-radius: var(--checkout-radius);
    position: sticky;
    top: 150px;
}

.order-items-list {
    border-bottom: 1px solid #303030;
}

.order-item {
    display: flex;
    gap: 15px;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.order-item-img {
    width: 55px;
    height: 55px;
    background: #111;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid #414141;
    padding: 5px;
}

.order-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-item-details {
    flex: 1;
}

.order-item-name {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
}

.order-item-qty {
    font-size: 11px;
    color: var(--checkout-text-muted);
}

.order-item-price {
    font-size: 13px;
    font-weight: 700;
}

/* Coupon Area Refinement */
.coupon-area {
    display: flex;
    gap: 10px;
    margin: 20px 0 25px;
}

.coupon-area input {
    flex: 1;
    height: 45px !important;
}

.coupon-area button {
    background: #111 !important;
    color: #fff !important;
    border: 1px solid #333 !important;
    padding: 0 15px !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    height: 45px !important;
    border-radius: 4px !important;
    transition: opacity 0.3s;
}

.coupon-area button.loading {
    opacity: 0.7;
    cursor: not-allowed;
    position: relative;
    color: transparent !important;
}

.coupon-area button.loading::after {
    content: "APPLYING";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    display: flex;
}

.coupon-area button.loading::after {
    animation: applyingDots 1.5s infinite;
}

@keyframes applyingDots {
    0% { content: "APPLYING."; }
    33% { content: "APPLYING.."; }
    66% { content: "APPLYING..."; }
}

/* Totals Section */
.order-totals {
    border-top: 1px solid var(--checkout-border);
    padding-top: 20px;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--checkout-text-muted);
}

.totals-row.total {
    border-top: 1px solid var(--checkout-border);
    margin-top: 20px;
    padding-top: 25px;
    font-size: 26px;
    font-weight: 800;
    color: #fff;
}

.totals-row .value {
    color: #fff;
}

.totals-row.cart-discount {
    color: #4cd137;
}

.totals-row.cart-discount .value {
    color: #4cd137;
}

/* Place Order Button Refinement */
#place_order {
    width: 100% !important;
    background: #fff !important;
    color: #000 !important;
    border: none !important;
    padding: 22px !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    border-radius: 4px !important; /* Squared as per modern premium feel, or keep if user likes round. Image shows squared buttons in general. */
    margin-top: 25px !important;
    cursor: pointer !important;
    display: block !important;
    letter-spacing: 1px;
    transition: all 0.3s;
}

#place_order:hover {
    background: #eee !important;
    transform: translateY(-2px);
}

/* Acknowledgements box refinement */
.acknowledgement-box {
    background: #000 !important;
    border: 1px solid #414141 !important;
    margin-top: 35px;
    padding: 25px !important;
    border-radius: 4px;
    transition: border-color 0.4s ease;
}

.acknowledgement-box.is-complete {
    border-color: #0fd654 !important; /* Brighter green as per image */
}

.acknowledgement-box .title {
    color: #fff !important;
    letter-spacing: 1px !important;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Space Grotesk';
}

.acknowledgement-status-icon {
    font-size: 24px !important;
    color: #333;
    transition: color 0.4s;
}

.is-complete .acknowledgement-status-icon {
    color: #0fd654 !important;
}

.ack-item {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.ack-item label {
    font-size: 13px !important;
    color: #fff !important;
    font-weight: 500 !important;
    text-transform: none !important;
    line-height: 1.6;
    margin: 0 !important;
    cursor: pointer;
}

/* Custom Checkbox */
.custom-checkbox-wrapper {
    position: relative;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 3px;
}

.custom-checkbox-wrapper input {
    opacity: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    cursor: pointer;
    z-index: 2;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border-radius: 4px;
    z-index: 1;
}

.custom-checkbox-wrapper input:checked ~ .checkmark:after {
    content: "";
    position: absolute;
    display: block;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid #000;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.research-notice {
    text-align: center;
    font-size: 10px;
    color: #666;
    font-weight: 800;
    margin-top: 25px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Mobile Responsive */
@media (max-width: 991px) {
    .checkout-container {
        flex-direction: column;
        margin: 30px auto;
    }
    .checkout-right-col {
        width: 100%;
    }
    .address-grid-2, .address-grid-3 {
        grid-template-columns: 1fr;
    }
}

@media(max-width: 767px){
    .checkout-header h1 {
        font-size: 20px !important;
    }
}

/* Toast Notifications */
.checkout-toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #111;
    color: #fff;
    padding: 15px 25px;
    border-radius: 4px;
    z-index: 10000;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-left: 4px solid #fff;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkout-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.checkout-toast.success {
    border-left-color: #0fd654;
}

.checkout-toast.error {
    border-left-color: #ff4d4d;
}

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

/* Cart Page Redesign */
body.woocommerce-cart {
    background-color: #000 !important;
    color: #fff;
}

.cart-container {
    max-width: 1200px;
}

.cart-header {
    margin-bottom: 30px;
}

.continue-shopping {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    color: #888;
    text-transform: uppercase;
    text-decoration: none;
    margin-bottom: 20px;
}

.continue-shopping:hover {
    color: #fff;
}

.cart-title {
    font-size: 36px !important;
    font-family: 'Space Grotesk';
    font-weight: 900;
    margin: 0;
    letter-spacing: -1px;
    margin-bottom: 30px;
}

.cart-count {
    font-size: 10px;
    background: #1a1a1a;
    padding: 4px 10px;
    border-radius: 4px;
    vertical-align: middle;
    margin-left: 15px;
    letter-spacing: 1px;
    color: #888;
}

/* Custom Shipping Progress Bar */
.custom-shipping-progress {
    background: #0b0b0b;
    border: 1px solid #303030;
    padding: 20px 25px;
    border-radius: 4px;
    margin-bottom: 35px;
}

.custom-shipping-progress.complete {
    border-color: rgba(15, 214, 84, 0.3);
}

.progress-message {
    font-size: 13px;
    color: #fff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.progress-message .dashicons {
    color: #888;
    font-size: 20px;
}

.complete .progress-message .dashicons {
    color: #0fd654;
}

.progress-bar-container {
    background: #222;
    height: 4px;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-fill {
    background: #fff;
    height: 100%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.complete .progress-bar-fill {
    background: #0fd654;
}

/* Cart Wrapper Layout */
.cart-wrapper {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.cart-items-col {
    flex: 1;
}

.cart-summary-col {
    width: 420px;
}

/* Cart Item Cards */
.cart-item-card {
    background: #0b0b0b;
    border: 1px solid #303030;
    padding: 25px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    gap: 25px;
    align-items: center;
    position: relative;
    transition: border-color 0.3s;
}

.cart-item-card:hover {
    border-color: #555;
}

.cart-item-img {
    width: 100px;
    height: 100px;
    border-radius: 4px;
    border: 1px solid #303030;
    padding: 10px;
    flex-shrink: 0;
}

.cart-item-actions .quantity input[type="button"]{
    background: #242424 !important;
}
.cart-item-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cart-item-info {
    flex: 1;
}

.cart-item-name a {
    font-size: 18px;
    font-family: 'Space Grotesk';
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    line-height: 1.2;
}

.cart-item-meta {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.quantity-wrapper {
    margin-top: 20px;
    display: flex;
    align-items: center;
}

.cart-item-price-remove {
    text-align: right;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-self: stretch;
}

.remove-item {
    color: #444;
    font-size: 18px;
    transition: color 0.3s;
}

.remove-item:hover {
    color: #ff4d4d;
}

.cart-item-price {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
}

/* Summary Card Refinement */
.summary-title {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 30px;
}

.coupon-area-cart {
    display: flex;
    gap: 10px;
    margin-bottom: 40px;
}

.coupon-area-cart input {
    background: #111 !important;
    border: 1px solid #303030 !important;
    color: #fff !important;
    padding: 15px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    flex: 1;
    border-radius: 4px !important;
}

.applied-coupon-wrapper {
    background: #111;
    border: 1px solid #303030;
    padding: 15px 20px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.applied-coupon-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 13px;
}

.applied-coupon-info .dashicons {
    color: #0fd654;
    font-size: 18px;
}

.remove-coupon-cart {
    font-size: 10px;
    font-weight: 800;
    color: #ff4d4d;
    text-decoration: none;
    letter-spacing: 1px;
    transition: opacity 0.3s;
}

.remove-coupon-cart:hover {
    opacity: 0.7;
    color: #ff4d4d;
}

.apply-coupon-btn {
    background: #111 !important;
    border: 1px solid #303030 !important;
    color: #fff !important;
    padding: 0 20px !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    border-radius: 4px !important;
    cursor: pointer;
}

.summary-totals {
    border-top: 1px solid #222;
    padding-top: 25px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.summary-row span:first-child {
    color: #888;
}

.summary-row span:last-child {
    color: #fff;
    font-weight: 700;
}

.summary-row.discount span:last-child {
    color: #888;
}

.summary-row.total {
    border-top: 1px solid #222;
    margin-top: 25px;
    padding-top: 30px;
}

.summary-row.total span:first-child {
    color: #fff;
    font-weight: 900;
    font-size: 24px;
}

.summary-row.total span:last-child {
    font-size: 32px;
    font-weight: 900;
}

.cart-actions {
    margin-top: 40px;
}

.checkout-button {
    background: #fff !important;
    color: #000 !important;
    padding: 22px !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-weight: 900 !important;
    text-decoration: none !important;
    border-radius: 40px !important;
    font-size: 14px !important;
    transition: background 0.3s;
    width: 100%;
}

.checkout-button:hover {
    background: #eee !important;
}

.research-notice-cart {
    text-align: center;
    font-size: 12px;
    color: #444;
    font-weight: 800;
    margin-top: 20px;
    letter-spacing: 1.5px;
}

/* Quantity Input Redesign */
.quantity-wrapper .quantity {
    display: flex;
    align-items: center;
    border: 1px solid #303030;
    border-radius: 4px;
    background: #000;
    overflow: hidden;
}

.quantity-wrapper .quantity button {
    background: none;
    border: none;
    color: #888;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.3s;
}

.quantity-wrapper .quantity button:hover {
    color: #fff;
}

.quantity-wrapper .quantity input {
    width: 40px !important;
    background: none !important;
    border: none !important;
    color: #fff !important;
    text-align: center !important;
    padding: 0 !important;
    font-weight: 700 !important;
}

/* Hide spin buttons */
.quantity-wrapper .quantity input::-webkit-outer-spin-button,
.quantity-wrapper .quantity input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Hide standard Update Cart button as we can use AJAX or keep it hidden */
.cart-update-hidden {
    display: none;
}

@media (max-width: 915px) {
    .cart-wrapper {
        flex-direction: column;
    }
    .cart-summary-col {
        width: 100%;
    }
    .cart-title {
        font-size: 32px !important;
    }
}

@media (max-width: 767px) {
    .cart-item-card {
        align-items: flex-start;
        gap: 20px;
        padding: 20px;
        flex-wrap: wrap;
    }
    /* .cart-item-actions{
        position: absolute;
        top: 108px;
    } */
    .cart-item-img {
        width: 100%;
        height: auto;
        max-width: 108px;
    }
    .cart-item-info {
        width: 100%;
    }
    .cart-item-price-remove {
        flex-direction: row-reverse;
        align-items: center;
        width: 100%;
        justify-content: space-between;
        border-top: 1px solid #222;
        padding-top: 20px;
        text-align: left;
    }
    .cart-item-name a {
        font-size: 14px;
        font-family: 'Space Grotesk';
    }
    .summary-row.total span:last-child {
        font-size: 24px;
    }
    .cart-title {
        font-size: 26px !important;
    }
}
