/**
 * Notes n Roots Commerce - Frontend & Checkout Styles
 */

.nnr-commerce-wrap {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: 'Outfit', sans-serif;
    color: #1a1a1a;
}

.nnr-empty-state {
    text-align: center;
    padding: 80px 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
}
.nnr-empty-icon { font-size: 64px; margin-bottom: 16px; }
.nnr-empty-state h2 { font-family: 'Montserrat', sans-serif; font-size: 28px; margin-bottom: 8px; }
.nnr-empty-state p { color: #666; margin-bottom: 24px; }

/* ================= Cart Layout ================= */
.nnr-cart-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

.nnr-table-cart {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}
.nnr-table-cart th {
    background: #f9f9f9;
    padding: 16px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
    border-bottom: 1px solid #eee;
}
.nnr-table-cart td {
    padding: 16px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.nnr-cart-prod-cell {
    display: flex;
    align-items: center;
    gap: 16px;
}
.nnr-cart-thumb {
    width: 60px;
    height: 75px;
    object-fit: contain;
    background: #fdfaf5;
    border-radius: 4px;
    padding: 4px;
}
.nnr-cart-prod-title {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}
.nnr-cart-prod-orig {
    color: #888;
    font-size: 13px;
    font-style: italic;
}
.nnr-cart-size-badge {
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}

.nnr-qty-box {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}
.nnr-qty-btn {
    background: #f9f9f9;
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
}
.nnr-qty-btn:hover { background: #eee; }
.nnr-qty-input {
    width: 40px;
    height: 32px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    font-weight: bold;
}
.nnr-cart-remove-btn {
    background: none;
    border: none;
    color: #bbb;
    font-size: 22px;
    cursor: pointer;
    transition: color 0.2s;
}
.nnr-cart-remove-btn:hover { color: #d63638; }

.nnr-cart-coupon-box {
    margin-top: 25px;
    display: flex;
    gap: 10px;
    align-items: center;
}
.nnr-cart-coupon-box input {
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-width: 250px;
}

/* ================= Summary Card ================= */
.nnr-summary-card {
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    border: 1px solid #efeae0;
}
.nnr-summary-card h3 {
    margin: 0 0 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    border-bottom: 2px solid #c5a059;
    padding-bottom: 10px;
}
.nnr-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
}
.nnr-summary-grand {
    font-size: 18px;
    font-weight: 800;
    border-top: 1px solid #eee;
    padding-top: 14px;
    margin-top: 14px;
    color: #111;
}
.nnr-discount-row { color: #d63638; font-weight: bold; }

.nnr-shipping-progress {
    background: #fdf8ee;
    border: 1px solid #f2e2be;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 13px;
}
.nnr-progress-bar {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}
.nnr-progress-fill {
    height: 100%;
    background: #25d366;
    transition: width 0.4s ease;
}
.nnr-free-ship-success { color: #137333; font-weight: bold; margin: 0; }

.nnr-btn-block { width: 100%; text-align: center; display: block; margin-top: 20px; }
.nnr-trust-note {
    text-align: center;
    font-size: 12px;
    color: #777;
    margin-top: 14px;
}

/* ================= Checkout Grid ================= */
.nnr-checkout-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 40px;
    align-items: start;
}
.nnr-checkout-box {
    background: #fff;
    padding: 28px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: 1px solid #eee;
}
.nnr-box-title {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    color: #111;
}
.nnr-form-row { margin-bottom: 16px; }
.nnr-form-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 600;
}
.nnr-form-row .req { color: #d63638; }
.nnr-form-row input, .nnr-form-row select, .nnr-form-row textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
}
.nnr-form-row input:focus, .nnr-form-row select:focus, .nnr-form-row textarea:focus {
    border-color: #c5a059;
    outline: none;
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.2);
}
.nnr-form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Payment Gateways */
.nnr-gateways-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.nnr-gateway-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 14px 18px;
    cursor: pointer;
    display: block;
    transition: all 0.2s ease;
}
.nnr-gateway-item.active {
    border-color: #c5a059;
    background: #fdfaf3;
}
.nnr-gw-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}
.nnr-gw-desc {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #d5c8ab;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

/* Checkout Review Items */
.nnr-checkout-items {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 16px;
}
.nnr-ch-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.nnr-ch-thumb {
    width: 48px;
    height: 58px;
    object-fit: contain;
    background: #fafafa;
    border-radius: 4px;
}
.nnr-ch-info { flex: 1; }
.nnr-ch-info h4 { margin: 0; font-size: 14px; font-weight: 700; }
.nnr-ch-info small { color: #777; }
.nnr-ch-price { font-weight: 700; font-size: 14px; }
.nnr-sep { border: 0; border-top: 1px solid #eee; margin: 16px 0; }

.nnr-checkout-guarantees {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #555;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Modal */
.nnr-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 20px;
}
.nnr-modal-dialog {
    background: #fff;
    max-width: 500px;
    width: 100%;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

/* Timeline Tracking */
.nnr-status-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 30px 0;
}
.nnr-status-timeline::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: #ddd;
    z-index: 1;
}
.nnr-timeline-step {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 25%;
}
.nnr-timeline-step .dot {
    width: 22px;
    height: 22px;
    background: #ccc;
    border-radius: 50%;
    margin: 0 auto 8px;
    border: 3px solid #fff;
}
.nnr-timeline-step.active .dot {
    background: #25d366;
    box-shadow: 0 0 0 3px rgba(37,211,102,0.3);
}
.nnr-timeline-step span { font-size: 12px; font-weight: 600; color: #777; }
.nnr-timeline-step.active span { color: #111; font-weight: 700; }

@media (max-width: 900px) {
    .nnr-cart-layout, .nnr-checkout-grid {
        grid-template-columns: 1fr;
    }
}
