/* OZWraps Shop — Frontend Styles */

.ozwraps-shop { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: #333; }

/* ── Product Grid ─────────────────────────────── */
.oz-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.oz-product-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, transform 0.2s;
}
.oz-product-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.12); transform: translateY(-2px); }

.oz-product-img-wrap { background: #f5f5f5; aspect-ratio: 4/3; overflow: hidden; }
.oz-product-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.oz-img-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.oz-img-placeholder svg { width: 80px; opacity: 0.5; }

.oz-product-body { padding: 18px; }
.oz-product-body h3 { margin: 0 0 8px; font-size: 16px; color: #1a1a2e; line-height: 1.3; }
.oz-product-desc { font-size: 13px; color: #666; line-height: 1.5; margin: 0 0 14px; }

.oz-product-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.oz-price { font-size: 20px; font-weight: 700; color: #1a1a2e; }
.oz-price small { font-size: 12px; font-weight: 400; color: #888; }

.oz-qty-wrap { display: flex; align-items: center; gap: 0; border: 2px solid #e0e0e0; border-radius: 8px; overflow: hidden; }
.oz-qty-btn { background: #f5f5f5; border: none; width: 36px; height: 36px; font-size: 18px; cursor: pointer; transition: background 0.15s; display: flex; align-items: center; justify-content: center; color: #333; }
.oz-qty-btn:hover { background: #1a1a2e; color: #fff; }
.oz-qty-val { width: 36px; text-align: center; font-size: 15px; font-weight: 600; background: #fff; line-height: 36px; }

/* ── Cart Bar ─────────────────────────────────── */
.oz-cart-bar {
    position: sticky;
    bottom: 20px;
    background: #1a1a2e;
    color: #fff;
    border-radius: 12px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    z-index: 100;
    margin: 0 0 30px;
}
.oz-cart-info { font-size: 15px; }
.oz-sep { margin: 0 8px; opacity: 0.4; }

/* ── Buttons ──────────────────────────────────── */
.oz-btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 10px 20px; border-radius: 8px; font-size: 14px; font-weight: 600;
    cursor: pointer; border: 2px solid transparent; transition: all 0.2s; text-decoration: none;
    white-space: nowrap;
}
.oz-btn-primary { background: #1a1a2e; color: #fff; border-color: #1a1a2e; }
.oz-btn-primary:hover { background: #2d2d4e; border-color: #2d2d4e; color: #fff; }
.oz-btn-secondary { background: #fff; color: #1a1a2e; border-color: #1a1a2e; }
.oz-btn-secondary:hover { background: #1a1a2e; color: #fff; }
.oz-btn-pay { width: 100%; padding: 16px; font-size: 16px; margin-top: 16px; }
.oz-back-link { background: none; border: none; color: #666; cursor: pointer; font-size: 14px; padding: 0; }
.oz-back-link:hover { color: #1a1a2e; }

/* ── Checkout Panel ───────────────────────────── */
.oz-checkout-panel { margin-top: 20px; }
.oz-panel-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.oz-panel-header h2 { margin: 0; font-size: 22px; color: #1a1a2e; }

.oz-box {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}
.oz-box h3 { margin: 0 0 14px; font-size: 16px; color: #1a1a2e; border-bottom: 2px solid #f0f0f0; padding-bottom: 10px; }

.oz-help { font-size: 13px; color: #777; margin: 0 0 14px; }

.oz-row-inline { display: flex; gap: 10px; align-items: stretch; }
.oz-row-inline .oz-btn { flex-shrink: 0; }

.oz-input {
    width: 100%; padding: 10px 12px; border: 2px solid #e0e0e0; border-radius: 8px;
    font-size: 14px; background: #fff; transition: border-color 0.2s; box-sizing: border-box;
}
.oz-input:focus { border-color: #1a1a2e; outline: none; }
.oz-postcode-input { max-width: 140px; flex: 0 0 140px; }
select.oz-input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23333' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* ── Shipping Options ─────────────────────────── */
.oz-rates-wrap { margin-top: 14px; }
.oz-shipping-options { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.oz-rate-option {
    display: flex; align-items: center; gap: 14px;
    border: 2px solid #e0e0e0; border-radius: 10px; padding: 14px 16px;
    cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.oz-rate-option:hover { border-color: #1a1a2e; }
.oz-rate-option input[type=radio] { width: 18px; height: 18px; accent-color: #1a1a2e; flex-shrink: 0; }
.oz-rate-option.oz-selected { border-color: #1a1a2e; background: #f0f2ff; }
.oz-rate-name { font-weight: 600; font-size: 14px; }
.oz-rate-days { font-size: 12px; color: #888; }
.oz-rate-price { margin-left: auto; font-weight: 700; font-size: 16px; color: #1a1a2e; }
.oz-fallback-note { font-size: 12px; color: #e07000; margin-top: 8px; }

/* ── Form grid ────────────────────────────────── */
.oz-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.oz-field { display: flex; flex-direction: column; gap: 4px; }
.oz-col-2 { grid-column: span 2; }
.oz-col-half { grid-column: span 1; }
.oz-field label { font-size: 12px; font-weight: 600; color: #555; }

/* ── Cart Summary ─────────────────────────────── */
.oz-cart-summary-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.oz-cart-summary-table td { padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.oz-cart-summary-table tr:last-child td { border-bottom: none; }
.oz-cs-qty { color: #888; font-size: 12px; }

/* ── Order Total ──────────────────────────────── */
.oz-totals { margin-bottom: 10px; }
.oz-total-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.oz-total-row.oz-grand { border-bottom: none; font-size: 18px; font-weight: 700; padding-top: 12px; color: #1a1a2e; }
.oz-stripe-note { font-size: 12px; color: #888; text-align: center; margin: 10px 0 0; }
.oz-error-msg { color: #c00; font-size: 13px; margin-top: 10px; padding: 10px; background: #fff0f0; border-radius: 6px; }

/* ── Result pages ─────────────────────────────── */
.oz-result-page { text-align: center; padding: 40px 20px; }
.oz-result-icon { width: 70px; height: 70px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 32px; margin: 0 auto 20px; }
.oz-success-icon { background: #e6f9ee; color: #27ae60; }
.oz-cancel-icon { background: #ffeaea; color: #c0392b; }
.oz-result-page h2 { font-size: 26px; margin-bottom: 12px; color: #1a1a2e; }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 600px) {
    .oz-products-grid { grid-template-columns: 1fr; }
    .oz-form-grid { grid-template-columns: 1fr; }
    .oz-col-2, .oz-col-half { grid-column: span 1; }
    .oz-cart-bar { flex-direction: column; gap: 10px; text-align: center; }
    .oz-row-inline { flex-direction: column; }
    .oz-postcode-input { max-width: 100%; flex: auto; }
}
