/**
 * Order Page Styles - Complete Redesign
 * Modern, intuitive order flow with step indicators
 *
 * @package ComputerBackup
 * @version 1.0.4
 */

/* ==========================================================================
   ORDER HERO - Steps & Header
   ========================================================================== */

.order-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: 3rem 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.order-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(40, 167, 69, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.order-hero .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.order-hero__content h1 {
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.order-hero__content p {
    opacity: 0.9;
    margin: 0;
    font-size: 1.0625rem;
}

/* Step Indicators */
.order-hero__steps {
    display: flex;
    align-items: center;
    gap: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 0.8;
}

.step-number {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: #28A745;
    border-color: #28A745;
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.4);
}

.step.completed .step-number {
    background: rgba(40, 167, 69, 0.5);
    border-color: rgba(40, 167, 69, 0.5);
}

.step-label {
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.step-line {
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 0.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .order-hero .container {
        flex-direction: column;
        text-align: center;
    }

    .order-hero__steps {
        justify-content: center;
    }

    .step-label {
        display: none;
    }

    .step-line {
        margin-bottom: 0;
    }
}

/* ==========================================================================
   MAIN ORDER LAYOUT
   ========================================================================== */

.order-main {
    padding: 3rem 0 4rem;
    background: var(--gray-50);
    min-height: 60vh;
}

.order-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.order-layout.has-selection {
    grid-template-columns: 1fr 400px;
}

@media (max-width: 1100px) {
    .order-layout.has-selection {
        grid-template-columns: 1fr;
    }

    .order-config {
        order: -1;
    }
}

/* ==========================================================================
   PACKAGES SECTION
   ========================================================================== */

.packages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.packages-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #002D72;
}

.change-selection {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--gray-500);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.change-selection:hover {
    color: #002D72;
}

/* Packages Grid */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.has-selection .packages-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

/* Package Card */
.package-card {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 1rem;
    padding: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.has-selection .package-card {
    padding: 1.25rem;
}

.package-card:hover {
    border-color: #002D72;
    box-shadow: 0 10px 30px rgba(0, 45, 114, 0.1);
    transform: translateY(-3px);
}

.package-card.selected {
    border-color: #28A745;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    box-shadow: 0 10px 30px rgba(40, 167, 69, 0.15);
}

.package-card.recommended {
    border-color: #28A745;
}

.package-card.recommended:not(.selected):hover {
    border-color: #28A745;
}

/* Package Badge */
.package-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #28A745, #34ce57);
    color: white;
    padding: 0.25rem 0.875rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3);
}

.package-selected-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #28A745;
    font-size: 1.5rem;
}

/* Package Header */
.package-header {
    text-align: center;
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--gray-200);
}

.package-card.selected .package-header {
    border-color: rgba(40, 167, 69, 0.2);
}

.package-header h3 {
    margin: 0 0 0.5rem;
    font-size: 1.125rem;
    color: #002D72;
}

.has-selection .package-header h3 {
    font-size: 1rem;
}

.package-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: #28A745;
}

.has-selection .package-price {
    font-size: 1.5rem;
}

.package-price .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
}

.price-period {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-500);
}

/* Package Features */
.package-features {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-bottom: 1.25rem;
}

.package-features .feature {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.has-selection .package-features .feature {
    font-size: 0.8125rem;
}

.package-features .feature i {
    font-size: 1rem;
    color: #002D72;
    width: 20px;
    flex-shrink: 0;
}

.package-features .feature.highlight {
    color: #166534;
    font-weight: 500;
}

.package-features .feature.highlight i {
    color: #28A745;
}

.package-features .feature.muted {
    color: var(--gray-400);
}

.package-features .feature.muted i {
    color: var(--gray-300);
}

/* Package Action */
.package-action {
    margin-top: auto;
}

.btn-select {
    display: block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #002D72;
    color: #002D72;
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-select:hover {
    background: #002D72;
    color: white;
}

.btn-select.btn-primary {
    background: linear-gradient(135deg, #28A745, #34ce57);
    border-color: #28A745;
    color: white;
}

.btn-select.btn-primary:hover {
    background: linear-gradient(135deg, #1e7e34, #28A745);
    transform: translateY(-1px);
}

.selected-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: #28A745;
    color: white;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
}

/* Packages Note */
.packages-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.packages-note i {
    font-size: 1.125rem;
    color: #002D72;
}

/* ==========================================================================
   CATEGORY TABS
   ========================================================================== */

.category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    color: var(--gray-500);
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.category-tab:hover {
    color: #002D72;
    background: rgba(0, 45, 114, 0.04);
    border-radius: 0.5rem 0.5rem 0 0;
}

.category-tab.active {
    color: #002D72;
    border-bottom-color: #002D72;
    font-weight: 600;
}

.category-tab i {
    font-size: 1.25rem;
}

.category-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.375rem;
    height: 1.375rem;
    padding: 0 0.375rem;
    background: var(--gray-100);
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
}

.category-tab.active .category-tab__count {
    background: #002D72;
    color: white;
}

/* Tab Panels */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.tab-panel__desc {
    margin: 0 0 1.25rem;
    color: var(--gray-500);
    font-size: 0.9375rem;
}

@media (max-width: 600px) {
    .category-tab {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .category-tab__label {
        /* Keep labels visible on mobile for clarity */
    }

    .category-tab i {
        font-size: 1.125rem;
    }
}

/* ==========================================================================
   ORDER CONFIG PANEL
   ========================================================================== */

.order-config {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.config-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-200);
}

/* Config Header */
.config-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.config-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: linear-gradient(135deg, #28A745, #34ce57);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.config-header h2 {
    margin: 0 0 0.5rem;
    font-size: 1.375rem;
    color: #002D72;
}

.config-price {
    font-size: 2rem;
    font-weight: 800;
    color: #28A745;
}

.config-price span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--gray-500);
}

/* Config Summary */
.config-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: 0.5rem;
    text-align: center;
}

.summary-item i {
    font-size: 1.5rem;
    color: #002D72;
}

.summary-item strong {
    font-size: 1rem;
    color: var(--gray-800);
}

.summary-item span {
    font-size: 0.75rem;
    color: var(--gray-500);
}

@media (max-width: 480px) {
    .config-summary {
        grid-template-columns: 1fr;
    }
}

/* Config Form */
.config-form {
    margin-bottom: 1.5rem;
}

.config-form form.cart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.config-form .quantity {
    display: flex;
    justify-content: center;
}

.config-form .quantity .qty {
    width: 100px;
    height: 48px;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
    border: 2px solid var(--gray-200);
    border-radius: 0.5rem;
}

.config-form .quantity .qty:focus {
    border-color: #002D72;
    outline: none;
}

.config-form .single_add_to_cart_button,
.config-form button[type="submit"] {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #28A745, #34ce57);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.config-form .single_add_to_cart_button:hover,
.config-form button[type="submit"]:hover {
    background: linear-gradient(135deg, #1e7e34, #28A745);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

/* Config Trust */
.config-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 1rem;
}

.config-trust .trust-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.config-trust .trust-item i {
    color: #28A745;
    font-size: 1rem;
}

/* Config Upgrade */
.config-upgrade {
    background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
    border: 1px solid #e9d5ff;
    border-radius: 0.75rem;
    padding: 1rem;
}

.upgrade-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #7c3aed;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.upgrade-header i {
    font-size: 1.25rem;
}

.config-upgrade p {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-700);
    line-height: 1.5;
}

.upgrade-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: #7c3aed;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: gap 0.2s;
}

.upgrade-link:hover {
    gap: 0.625rem;
}

/* Config Addons */
.config-addons {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.25rem;
}

.config-addons h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    font-size: 0.9375rem;
    color: #002D72;
}

.config-addons h4 i {
    color: #28A745;
}

.addons-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.addon-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.addon-item:hover {
    background: var(--gray-100);
}

.addon-info strong {
    display: block;
    font-size: 0.875rem;
    color: var(--gray-800);
    margin-bottom: 0.125rem;
}

.addon-price {
    font-size: 0.8125rem;
    color: #28A745;
    font-weight: 600;
}

.addon-link {
    width: 32px;
    height: 32px;
    background: #002D72;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s;
}

.addon-link:hover {
    background: #28A745;
    transform: scale(1.1);
}

/* ==========================================================================
   FALLBACK (No WooCommerce)
   ========================================================================== */

.order-fallback {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.fallback-intro {
    margin-bottom: 2rem;
}

.fallback-intro h2 {
    color: #002D72;
    margin-bottom: 0.5rem;
}

.fallback-intro p {
    color: var(--gray-500);
}

.fallback-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .fallback-grid {
        grid-template-columns: 1fr;
    }
}

.fallback-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 1rem;
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.fallback-card:hover {
    border-color: #002D72;
    box-shadow: 0 10px 30px rgba(0, 45, 114, 0.1);
    transform: translateY(-3px);
}

.fallback-card i {
    font-size: 3rem;
    color: #002D72;
    margin-bottom: 1rem;
}

.fallback-card h3 {
    color: #002D72;
    margin-bottom: 0.5rem;
}

.fallback-card .phone {
    font-size: 1.25rem;
    font-weight: 700;
    color: #002D72;
}

.fallback-card .hours,
.fallback-card .response {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.fallback-card .cta {
    color: #28A745;
    font-weight: 600;
}

/* ==========================================================================
   WHY SECTION
   ========================================================================== */

.why-section {
    background: white;
    padding: 4rem 0;
    border-top: 1px solid var(--gray-200);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 900px) {
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 500px) {
    .why-grid {
        grid-template-columns: 1fr;
    }
}

.why-item {
    text-align: center;
}

.why-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #002D72, #001A42);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.why-icon i {
    font-size: 1.75rem;
    color: white;
}

.why-item h3 {
    font-size: 1.0625rem;
    color: #002D72;
    margin-bottom: 0.5rem;
}

.why-item p {
    color: var(--gray-500);
    font-size: 0.9375rem;
    margin: 0;
}

/* ==========================================================================
   FAQ SECTION
   ========================================================================== */

.faq-quick {
    background: var(--gray-50);
    padding: 4rem 0;
}

.faq-quick h2 {
    text-align: center;
    color: #002D72;
    margin-bottom: 2rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

@media (max-width: 700px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

.faq-item {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    overflow: hidden;
}

.faq-item summary {
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    color: #002D72;
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    padding: 0 1.25rem 1rem;
    margin: 0;
    color: var(--gray-500);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ==========================================================================
   VOLUME PRICING DISPLAY
   ========================================================================== */

.volume-pricing-display {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin: 1rem 0;
}

.volume-pricing-display h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    font-size: 0.9375rem;
    color: #0369a1;
}

.volume-tiers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
}

.volume-tier {
    background: white;
    border: 1px solid #e0f2fe;
    border-radius: 0.5rem;
    padding: 0.625rem;
    text-align: center;
    position: relative;
}

.volume-tier.active {
    border-color: #0284c7;
    background: #f0f9ff;
}

.volume-tier .tier-qty {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.volume-tier .tier-price {
    font-size: 1rem;
    font-weight: 700;
    color: #0369a1;
}

.volume-tier .tier-save {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #28A745;
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    padding: 0.125rem 0.375rem;
    border-radius: 50px;
}
