/* =========================================================
   Store Order Page
   ========================================================= */

:root {
    --store-primary: #2563eb;
    --store-primary-dark: #1d4ed8;
    --store-primary-soft: #eff6ff;
    --store-text: #111827;
    --store-muted: #6b7280;
    --store-border: #e5e7eb;
    --store-card-border: #eeeeee;
    --store-bg: #f9fafb;
    --store-white: #ffffff;
    --store-radius: 16px;
    --store-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    --store-shadow-soft: 0 10px 24px rgba(37, 99, 235, 0.12);
}

.order-page {
    background: var(--store-bg);
    min-height: 100vh;
    padding: 120px 8% 34px;
}

.order-page.is-rtl {
    direction: rtl;
}

.order-page.is-ltr {
    direction: ltr;
}

/* =========================================================
   Back Link
   ========================================================= */

.back-link {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--store-primary);
    border: 1px solid #dbeafe;
    text-decoration: none;
    font-size: 15px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.back-link:hover {
    background: var(--store-primary);
    color: #ffffff;
    transform: translateY(-1px);
}

.back-link i {
    font-size: 15px;
}

/* =========================================================
   Layout
   ========================================================= */

.order-container {
    display: grid;
    grid-template-columns: 1.25fr 0.85fr;
    gap: 18px;
    align-items: start;
}

.order-card,
.summary-card {
    background: var(--store-white);
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius);
    padding: 20px;
    box-shadow: var(--store-shadow);
}

/* =========================================================
   Section Head
   ========================================================= */

.section-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
}

.section-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--store-primary-soft);
    color: var(--store-primary);
    display: grid;
    place-items: center;
    font-size: 18px;
    flex-shrink: 0;
}

.section-head h1,
.summary-card h2 {
    color: var(--store-text);
    font-size: 20px;
    line-height: 1.3;
    font-weight: 600;
}

.section-head p {
    color: var(--store-muted);
    font-size: 15px;
    line-height: 1.7;
    margin-top: 4px;
}

/* =========================================================
   Form
   ========================================================= */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.form-group {
    min-width: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-size: 15px;
    font-weight: 500;
}

.form-group label span {
    color: #ef4444;
}

.form-group input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--store-border);
    border-radius: 12px;
    padding: 0 14px;
    background: #ffffff;
    color: var(--store-text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input::placeholder {
    color: #9ca3af;
}

.form-group input:focus {
    border-color: var(--store-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #ef4444;
    font-size: 13px;
}

.secure-message {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 12px 14px;
    border: 1px solid #dcfce7;
    border-radius: 12px;
    background: #f0fdf4;
    color: #15803d;
    font-size: 14px;
    line-height: 1.6;
}

.secure-message i {
    flex-shrink: 0;
}

/* =========================================================
   Summary
   ========================================================= */

.summary-card {
    position: sticky;
    top: 110px;
}

.summary-card h2 {
    margin-bottom: 18px;
}

.subscription-summary {
    display: flex;
    gap: 14px;
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--store-border);
}

.summary-image {
    width: 96px;
    height: 96px;
    border-radius: 14px;
    background: var(--store-primary-soft);
    overflow: hidden;
    flex-shrink: 0;
}

.summary-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: var(--store-primary);
    font-size: 24px;
}

.subscription-info {
    min-width: 0;
}

.subscription-info h3 {
    color: var(--store-text);
    font-size: 16px;
    line-height: 1.45;
    margin-bottom: 6px;
    font-weight: 600;
}

.subscription-info p {
    color: var(--store-muted);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 10px;
}

.subscription-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid #dbeafe;
    background: var(--store-primary-soft);
    color: var(--store-primary);
    font-size: 12px;
}

.badge-soft {
    background: #f8fafc;
    border-color: #e5e7eb;
    color: #4b5563;
}

/* =========================================================
   Rows
   ========================================================= */

.summary-row,
.total-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--store-border);
}

.summary-row span,
.total-box span {
    color: var(--store-muted);
    font-size: 14px;
}

.summary-row strong {
    color: var(--store-text);
    font-size: 14px;
    font-weight: 600;
}

.total-box {
    border-bottom: 0;
    padding-bottom: 0;
}

.total-box strong {
    color: var(--store-text);
    font-size: 20px;
    font-weight: 600;
}

/* =========================================================
   Quantity
   ========================================================= */

.quantity-control {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid var(--store-border);
    border-radius: 12px;
    background: #ffffff;
}

.quantity-control button,
.quantity-control input {
    width: 38px;
    height: 38px;
    border: 0;
    background: #ffffff;
    color: var(--store-text);
    text-align: center;
}

.quantity-control button {
    cursor: pointer;
    color: var(--store-primary);
    transition: background 0.2s ease;
}

.quantity-control button:hover {
    background: var(--store-primary-soft);
}

.quantity-control input {
    border-left: 1px solid var(--store-border);
    border-right: 1px solid var(--store-border);
    outline: none;
    font-size: 14px;
    font-weight: 600;
}

/* =========================================================
   Submit Button
   ========================================================= */

.place-order-btn {
    width: 100%;
    height: 48px;
    margin-top: 22px;
    border: 0;
    border-radius: 12px;
    background: var(--store-primary);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.place-order-btn:hover {
    background: var(--store-primary-dark);
    transform: translateY(-1px);
}

.place-order-btn i {
    font-size: 16px;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {
    .order-page {
        padding-left: 6%;
        padding-right: 6%;
    }

    .order-container {
        grid-template-columns: 1fr;
    }

    .summary-card {
        position: static;
    }
}

@media (max-width: 820px) {
    .order-page {
        padding: 100px 16px 28px;
    }

    .order-card,
    .summary-card {
        padding: 16px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .section-head {
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .back-link {
        width: 100%;
        justify-content: center;
    }

    .subscription-summary {
        flex-direction: column;
    }

    .summary-image {
        width: 100%;
        height: 150px;
    }

    .summary-row,
    .total-box {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .quantity-control {
        width: 100%;
        justify-content: space-between;
    }

    .quantity-control button,
    .quantity-control input {
        flex: 1;
    }
}

/* =========================================================
   Very Large Screens
   ========================================================= */

@media (min-width: 1440px) {
    .order-page {
        padding-left: 10%;
        padding-right: 10%;
    }

    .order-container {
        max-width: 1320px;
        margin: 0 auto;
        grid-template-columns: 1.3fr 0.7fr;
        gap: 24px;
    }

    .back-link {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 1700px) {
    .order-page {
        padding-left: 12%;
        padding-right: 12%;
    }

    .order-container {
        max-width: 1450px;
        gap: 30px;
    }

    .order-card,
    .summary-card {
        padding: 26px;
    }
}

@media (min-width: 2000px) {
    .order-container {
        max-width: 1580px;
    }

    .order-page {
        padding-top: 150px;
    }
}

/* =========================================================
   Responsive Typography
   Add at the END of order.css
   ========================================================= */

.back-link,
.back-link i {
    font-size: clamp(14px, 0.75vw, 17px);
}

.section-head h1,
.summary-card h2 {
    font-size: clamp(20px, 1.15vw, 30px);
}

.section-head p,
.form-group label,
.form-group input,
.subscription-info p {
    font-size: clamp(14px, 0.8vw, 18px);
}

.form-group small {
    font-size: clamp(12px, 0.65vw, 15px);
}

.section-icon {
    font-size: clamp(18px, 0.9vw, 22px);
}

.subscription-info h3 {
    font-size: clamp(16px, 0.95vw, 23px);
}

.badge {
    font-size: clamp(12px, 0.65vw, 15px);
}

.summary-row span,
.total-box span,
.summary-row strong,
.quantity-control input {
    font-size: clamp(14px, 0.75vw, 17px);
}

.total-box strong {
    font-size: clamp(20px, 1.2vw, 32px);
}

.place-order-btn {
    font-size: clamp(15px, 0.9vw, 20px);
}

.place-order-btn i {
    font-size: clamp(15px, 0.85vw, 18px);
}


/* =========================================================
   Large Screen Control Scaling
   ========================================================= */

@media (min-width: 1440px) {
    .back-link {
        min-height: 44px;
        padding: 0 18px;
    }

    .form-group input {
        height: 50px;
        padding: 0 16px;
    }

    .place-order-btn {
        height: 52px;
    }

    .summary-image {
        width: 104px;
        height: 104px;
    }
}

@media (min-width: 1700px) {
    .section-icon {
        width: 54px;
        height: 54px;
    }

    .form-group input {
        height: 54px;
        border-radius: 14px;
    }

    .place-order-btn {
        height: 56px;
        border-radius: 14px;
    }

    .summary-image {
        width: 112px;
        height: 112px;
    }

    .quantity-control button,
    .quantity-control input {
        width: 42px;
        height: 42px;
    }

    .badge {
        min-height: 26px;
        padding: 4px 10px;
    }
}

@media (min-width: 2000px) {
    .order-card,
    .summary-card {
        padding: 32px;
    }

    .section-head {
        gap: 18px;
        margin-bottom: 28px;
    }

    .form-grid {
        gap: 22px;
    }

    .summary-row,
    .total-box {
        padding: 18px 0;
    }
}

