/* ============================================================
   Shipping Calculator Page — Matches site design language
   Brand orange (#f28c28) + light grey + Cairo
   ============================================================ */

/* Page hero (compact, on-brand) */
.calc-page-hero {
    background: linear-gradient(135deg, #0b1f3f 0%, #1a3a6e 100%);
    color: #ffffff;
    padding: 3rem 0 3rem;
    padding-top: clamp(6.5rem, 11vw + 3.5rem, 9rem);
    text-align: center;
    font-family: "Cairo", sans-serif;
}
.calc-page-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #ffffff;
}
.calc-page-hero p {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.85);
    max-width: 720px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Calculator */
.calc-section {
    background: #f4f8fb;
    padding: 3.5rem 0;
    font-family: "Cairo", sans-serif;
}
#shipping-calc,
#shipping-calc * {
    font-feature-settings: "tnum" 1, "lnum" 1;
}
#shipping-calc .calc-result-value,
#shipping-calc .calc-result-per,
#shipping-calc .calc-bd-value,
#shipping-calc .calc-counter input {
    font-variant-numeric: tabular-nums lining-nums;
    direction: ltr;
    unicode-bidi: bidi-override;
}

.calc-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 6px 24px rgba(11,31,63,0.06);
    max-width: 980px;
    margin: 0 auto;
}

.calc-form { margin: 0; }

.calc-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.calc-field { display: flex; flex-direction: column; }
.calc-field-full { margin-bottom: 1.5rem; }

.calc-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #5c5b5b;
    margin-bottom: 0.5rem;
    font-family: "Cairo", sans-serif;
}

.calc-select {
    width: 100%;
    height: 46px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    font-size: 0.95rem;
    color: #1a1a1a;
    padding: 0 14px;
    font-family: "Cairo", sans-serif;
    transition: border-color 0.15s, box-shadow 0.15s;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}
[dir="rtl"] .calc-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23999' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 14px center;
    padding-left: 32px;
}
[dir="ltr"] .calc-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23999' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 32px;
}
.calc-select:focus {
    outline: none;
    border-color: #f28c28;
    box-shadow: 0 0 0 3px rgba(242, 140, 40, 0.15);
}

.calc-counter {
    display: flex;
    align-items: stretch;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    height: 46px;
    overflow: hidden;
}
.calc-counter-btn {
    flex: 0 0 42px;
    background: #f8f9fa;
    border: none;
    color: #1a1a1a;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}
.calc-counter-btn:hover {
    background: #f28c28;
    color: #fff;
}
.calc-counter input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
    color: #1a1a1a;
    font-family: "Cairo", sans-serif;
    -moz-appearance: textfield;
}
.calc-counter input::-webkit-inner-spin-button,
.calc-counter input::-webkit-outer-spin-button {
    -webkit-appearance: none; margin: 0;
}
.calc-counter input:focus { outline: none; }

.calc-pills {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}
.calc-pill {
    position: relative;
    cursor: pointer;
    margin: 0;
}
.calc-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.calc-pill span {
    display: block;
    text-align: center;
    padding: 12px 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #5c5b5b;
    background: #fff;
    transition: all 0.15s;
    font-family: "Cairo", sans-serif;
}
.calc-pill:hover span {
    border-color: #f28c28;
    color: #f28c28;
}
.calc-pill input:checked + span {
    background: #f28c28;
    color: #fff;
    border-color: #f28c28;
}

.calc-submit-row {
    text-align: center;
    margin-top: 0.5rem;
}
.calc-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 240px;
    background: #f28c28;
    color: #ffffff;
    border: 2px solid #f28c28;
    padding: 12px 36px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    font-family: "Cairo", sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s ease;
}
.calc-submit:hover:not(:disabled) {
    background: #ffffff;
    color: #f28c28;
}
.calc-submit:disabled { opacity: 0.7; cursor: not-allowed; }

.calc-alert {
    margin-top: 1rem;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: "Cairo", sans-serif;
    border: 1px solid transparent;
}
.calc-alert-info { background: #eef6ff; color: #1e3a8a; border-color: #bfdbfe; }
.calc-alert-warn { background: #fff7ed; color: #9a3412; border-color: #fed7aa; }
.calc-alert-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }

.calc-result {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eef0f3;
}
.calc-result-total {
    text-align: center;
    padding: 1.5rem;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    margin-bottom: 1.25rem;
}
.calc-result-label {
    display: block;
    font-size: 0.95rem;
    color: #9a3412;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: "Cairo", sans-serif;
}
.calc-result-value {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: #f28c28;
    line-height: 1.1;
}
.calc-result-per {
    display: block;
    margin-top: 0.4rem;
    color: #9a3412;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: "Cairo", sans-serif;
}

.calc-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}
.calc-bd-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f8f9fb;
    border: 1px solid #eef0f3;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: "Cairo", sans-serif;
}
.calc-bd-label { color: #5c5b5b; }
.calc-bd-value { color: #1a1a1a; font-weight: 700; }
.calc-bd-row.is-highlight {
    background: #fff7ed;
    border-color: #fed7aa;
}
.calc-bd-row.is-highlight .calc-bd-value { color: #f28c28; }

.calc-result-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1rem;
}
.calc-action-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #f28c28;
    color: #ffffff;
    border: 2px solid #f28c28;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: "Cairo", sans-serif;
    text-decoration: none;
    transition: all 0.25s ease;
}
.calc-action-primary:hover {
    background: #ffffff;
    color: #f28c28;
}
.calc-action-ghost {
    padding: 12px 28px;
    background: transparent;
    border: 1.5px solid #e5e7eb;
    color: #5c5b5b;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s;
    font-family: "Cairo", sans-serif;
}
.calc-action-ghost:hover {
    border-color: #f28c28;
    color: #f28c28;
}

.calc-disclaimer {
    text-align: center;
    margin: 0;
    font-size: 0.8rem;
    color: rgba(0,0,0,0.5);
    line-height: 1.6;
    font-family: "Cairo", sans-serif;
}

/* "How it works" section */
.calc-how-section {
    padding: 4rem 0;
    background: #ffffff;
    font-family: "Cairo", sans-serif;
}
.calc-how-head {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 2.5rem;
}
.calc-how-head h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 0.75rem;
}
.calc-how-head p {
    color: rgba(0,0,0,0.65);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
}
.calc-how-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.calc-how-step {
    background: #f4f8fb;
    border-radius: 12px;
    padding: 1.75rem 1.25rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.calc-how-step:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(11,31,63,0.08);
}
.calc-how-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #f28c28;
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}
.calc-how-step h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 0.5rem;
}
.calc-how-step p {
    font-size: 0.9rem;
    color: rgba(0,0,0,0.7);
    line-height: 1.7;
    margin: 0;
}

/* FAQ */
.calc-faq-section {
    padding: 4rem 0;
    background: #f4f8fb;
    font-family: "Cairo", sans-serif;
}
.calc-faq-head {
    text-align: center;
    margin-bottom: 2.5rem;
}
.calc-faq-head h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #000;
}
.calc-faq-list {
    max-width: 820px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.calc-faq-item {
    background: #fff;
    border: 1px solid #eef0f3;
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.calc-faq-item[open] {
    box-shadow: 0 6px 18px rgba(11,31,63,0.06);
    border-color: #fed7aa;
}
.calc-faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: #000;
    font-size: 1rem;
    position: relative;
    padding-inline-end: 2.5rem;
}
.calc-faq-item summary::-webkit-details-marker { display: none; }
.calc-faq-item summary::after {
    content: "+";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    font-weight: 700;
    color: #f28c28;
    line-height: 1;
}
[dir="rtl"] .calc-faq-item summary::after { left: 1.25rem; }
[dir="ltr"] .calc-faq-item summary::after { right: 1.25rem; }
.calc-faq-item[open] summary::after { content: "−"; }
.calc-faq-item p {
    margin: 0;
    padding: 0 1.25rem 1.25rem;
    color: rgba(0,0,0,0.7);
    line-height: 1.8;
    font-size: 0.95rem;
}

/* Bottom CTA */
.calc-cta-section {
    padding: 4rem 0;
    background: #ffffff;
    text-align: center;
    font-family: "Cairo", sans-serif;
}
.calc-cta-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #000;
    margin-bottom: 0.75rem;
}
.calc-cta-section p {
    color: rgba(0,0,0,0.65);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 auto 1.5rem;
    max-width: 600px;
}

/* Responsive */
@media (max-width: 992px) {
    .calc-grid { grid-template-columns: repeat(2, 1fr); }
    .calc-how-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
    .calc-page-hero {
        padding: 2.5rem 0 2.5rem;
        padding-top: clamp(7.25rem, 16vw + 3rem, 10rem);
    }
    .calc-page-hero h1 { font-size: 1.7rem; }
    .calc-section { padding: 2.5rem 0; }
    .calc-card { padding: 1.5rem; }
    .calc-grid { grid-template-columns: 1fr; }
    .calc-pills { grid-template-columns: repeat(2, 1fr); }
    .calc-result-value { font-size: 2rem; }
    .calc-how-grid { grid-template-columns: 1fr; }
    .calc-how-section,
    .calc-faq-section,
    .calc-cta-section { padding: 2.5rem 0; }
}
