/* Shopify-like Checkout CSS */
:root {
    --checkout-bg-left: #ffffff;
    --checkout-bg-right: #fafafa;
    --checkout-border-color: #e6e6e6;
    --checkout-input-border: #d9d9d9;
    --checkout-input-focus: #333333;
    --checkout-primary-btn: #000000;
    --checkout-primary-btn-text: #ffffff;
    --checkout-text-color: #333333;
    --checkout-text-muted: #737373;
    --checkout-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

body {
    font-family: var(--checkout-font-family);
    color: var(--checkout-text-color);
    margin: 0;
    padding: 0;
    height: 100%;
}

.checkout-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

@media (min-width: 1000px) {
    .checkout-container {
        flex-direction: row;
    }
}

/* Left Column (Main) */
.checkout-main {
    flex: 1;
    background-color: var(--checkout-bg-left);
    padding: 20px;
    order: 3;
    /* Mobile: Main is last */
}

@media (min-width: 1000px) {
    .checkout-main {
        padding: 50px 5% 20px 10%;
        order: 1;
        border-right: 1px solid var(--checkout-border-color);
        max-width: 55%;
    }
}

.checkout-header {
    margin-bottom: 30px;
    text-align: center;
}

@media (min-width: 1000px) {
    .checkout-header {
        text-align: left;
    }
}

.checkout-logo {
    max-height: 50px;
    margin-bottom: 20px;
}

.breadcrumbs {
    font-size: 0.85em;
    color: var(--checkout-text-muted);
    margin-bottom: 20px;
}

.breadcrumbs a {
    color: var(--checkout-text-muted);
    text-decoration: none;
}

.breadcrumbs .current {
    font-weight: 600;
    color: var(--checkout-text-color);
}

/* Right Column (Sidebar/Summary) */
.checkout-sidebar {
    flex: 0 0 40%;
    background-color: var(--checkout-bg-right);
    padding: 20px;
    border-bottom: 1px solid var(--checkout-border-color);
    order: 2;
    /* Mobile: Sidebar is second (after toggle) */
    display: none;
}

.checkout-sidebar.open {
    display: block;
}

@media (min-width: 1000px) {
    .checkout-sidebar {
        padding: 50px 10% 20px 5%;
        border-left: 1px solid var(--checkout-border-color);
        border-bottom: none;
        order: 2;
        min-height: 100vh;
        display: block;
    }
}

/* Mobile Summary Toggle */
.order-summary-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #fafafa;
    border-top: 1px solid #e6e6e6;
    border-bottom: 1px solid #e6e6e6;
    cursor: pointer;
    order: 1;
    /* Mobile: Toggle is first */
    color: #333;
}

.order-summary-toggle .toggle-text {
    color: #333;
    font-size: 0.95em;
}

.order-summary-toggle.open .toggle-icon {
    transform: rotate(180deg);
}

@media (min-width: 1000px) {
    .order-summary-toggle {
        display: none;
    }
}

.order-summary-content {
    display: none;
}


/* Product List */
.product-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.product-row td {
    padding-bottom: 15px;
    vertical-align: middle;
}

.product-image-wrapper {
    position: relative;
    width: 64px;
    height: 64px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: #fff;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.product-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: rgba(115, 115, 115, 0.9);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.75em;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.product-info {
    padding-left: 15px;
}

.product-title {
    font-weight: 500;
    font-size: 0.9em;
    display: block;
}

.product-variant {
    color: var(--checkout-text-muted);
    font-size: 0.8em;
}

.product-price {
    text-align: right;
    font-weight: 500;
    font-size: 0.95em;
}

/* Totals */
.totals-table {
    width: 100%;
    border-top: 1px solid rgba(175, 175, 175, 0.34);
    padding-top: 20px;
    margin-top: 20px;
}

.totals-row td {
    padding: 5px 0;
    color: var(--checkout-text-muted);
}

.totals-row.final-total td {
    padding-top: 20px;
    border-top: 1px solid rgba(175, 175, 175, 0.34);
    color: var(--checkout-text-color);
    font-size: 1.2em;
    font-weight: 600;
}

.total-price {
    text-align: right;
}

/* Forms */
.section-title {
    font-size: 1.1em;
    font-weight: 500;
    margin-bottom: 15px;
    margin-top: 30px;
}

.form-row {
    display: flex;
    margin: 0 -5px;
}

.form-col {
    flex: 1;
    padding: 0 5px;
}

.field-group {
    margin-bottom: 15px;
    position: relative;
}

.field-input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--checkout-input-border);
    border-radius: 5px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.field-input:focus {
    outline: none;
    border-color: var(--checkout-input-focus);
    box-shadow: 0 0 0 1px var(--checkout-input-focus);
}

.field-label {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 14px;
    color: var(--checkout-text-muted);
    pointer-events: none;
    transition: all 0.2s;
    opacity: 0;
    /* Simple placeholder approach for now */
}

/* Buttons */
.btn-checkout {
    background-color: var(--checkout-primary-btn);
    color: var(--checkout-primary-btn-text);
    border: none;
    padding: 18px 25px;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    transition: background-color 0.2s;
}

.btn-checkout:hover {
    opacity: 0.9;
}

.footer-links {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--checkout-border-color);
    font-size: 0.8em;
    color: var(--checkout-text-muted);
}

.footer-links a {
    color: var(--checkout-text-muted);
    margin-right: 15px;
    text-decoration: underline;
}