/* =============================================
   Order Page Layout
   ============================================= */

.order-layout-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 30px 20px;
    overflow-x: hidden;
}


/* === NEW: Main Grid (FIXED Image Column) === */

.order-top-grid {
    display: grid;
    /* Fixed 350px left column, flexible right column */
    grid-template-columns: 350px 1fr;
    gap: 50px;
    /* Increased gap */
    align-items: start;
}


/* =============================================
   Order Gallery (Left Column)
   ============================================= */


/* === THIS RULE IS NOW CORRECTED === */

.order-gallery {
    width: 350px;
    /* Match the grid column width */
    position: sticky;
    top: 140px;
    /* 120px header + 20px padding */
}

.order-product-image {
    width: 100%;
    aspect-ratio: 16 / 10;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    /* Softer radius */
    overflow: hidden;
    background-color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    /* Subtle shadow */
}

.order-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-countdown-box {
    background-color: var(--secondary-color);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    text-align: center;
}

.order-countdown-box h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-color);
}

.order-countdown-box .countdown-timer {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin: 10px 0 20px 0;
}

.get-rizon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.get-rizon-btn:hover {
    background-color: #fdfdfd;
    border-color: var(--primary-color);
    color: var(--primary-color);
}


/* =============================================
   Order Details (Right Column)
   ============================================= */

.order-details {
    min-width: 0;
    /* Prevents grid overflow */
}

.breadcrumbs {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.breadcrumbs a {
    color: var(--primary-color);
    font-weight: 500;
}

.breadcrumbs i {
    font-size: 10px;
    margin: 0 8px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 10px;
}

.order-header h1 {
    font-size: 32px;
    /* Larger title */
    font-weight: 700;
}

.order-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}


/* === NEW: Improved Button Style === */

.order-like-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    /* Better padding */
    font-size: 15px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.order-like-btn:hover {
    color: var(--highlight);
    border-color: var(--highlight);
}

.order-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    /* More space */
}

.order-rating .stars {
    color: #f8b400;
}

.order-rating span {
    font-weight: 600;
}

.order-rating a {
    color: var(--text-light);
    font-size: 14px;
    text-decoration: underline;
}

.important-notice {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    font-size: 14px;
}


/* === UPDATED: Selectors Grid === */

.order-selectors {
    display: grid;
    grid-template-columns: 3fr 1fr;
    /* 3 parts for Value, 1 part for Qty */
    gap: 15px;
    margin-bottom: 20px;
}

.order-selector label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.order-selector select,
.order-selector input[type="number"] {
    /* APPLIED styles to new input */
    width: 100%;
    padding: 12px;
    font-size: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--white);
    box-sizing: border-box;
    /* Ensures padding doesn't break layout */
}

.order-selector select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235c00d4'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}


/* === NEW: Improved Buy Box === */

.order-buy-box {
    margin-top: 0;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    /* Cleaner white */
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(92, 0, 212, 0.08);
    /* Nicer shadow */
}

.order-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.order-price .current-price {
    font-size: 32px;
    /* Larger price */
    font-weight: 700;
    color: var(--text-color);
}

.order-price .old-price {
    font-size: 20px;
    color: var(--text-light);
    text-decoration: line-through;
}

.order-price .discount-badge {
    background-color: var(--highlight);
    color: var(--white);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
}

.order-info-tags {
    display: flex;
    gap: 20px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-light);
    margin-bottom: 20px;
}

.order-info-tags i {
    color: var(--primary-color);
}

.buy-now-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: 16px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-now-btn:hover {
    opacity: 0.9;
    box-shadow: 0 4px 15px rgba(92, 0, 212, 0.3);
}

.payment-info {
    text-align: center;
    margin-top: 20px;
}


/* === UPDATED: Tabs === */

.order-tabs-wrapper {
    margin-top: 30px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--white);
}

.order-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--secondary-color);
}

.order-tab-btn {
    border: none;
    background: transparent;
    padding: 15px 25px;
    /* More padding */
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    margin-bottom: -1px;
    /* Aligns with border */
}

.order-tabs a.order-tab-btn {
    display: inline-block;
    text-decoration: none;
}

.order-tab-btn:hover {
    color: var(--primary-color);
}

.order-tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: var(--white);
}

.order-tab-content {
    padding: 25px;
}

.order-tab-panel {
    display: none;
    font-size: 16px;
    color: var(--text-light);
    line-height: 1.6;
}

.order-tab-panel.active {
    display: block;
}

.order-tab-panel h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
    margin-top: 15px;
}

.order-tab-panel h3:first-child {
    margin-top: 0;
}

.order-tab-panel p {
    margin-bottom: 15px;
}


/* =============================================
   NEW: Reviews Section
   ============================================= */

.order-reviews-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.order-reviews-section h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
}


/* =============================================
   Sticky Mobile Buy Bar
   ============================================= */

.sticky-buy-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--white);
    padding: 15px;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.08);
    z-index: 900;
    grid-template-columns: 100px 1fr;
    gap: 15px;
    align-items: center;
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
}

.sticky-buy-bar.visible {
    display: grid;
    /* Show on mobile scroll */
    transform: translateY(0);
}

.sticky-buy-price .current-price {
    font-size: 20px;
    font-weight: 700;
}

.sticky-buy-price .old-price {
    font-size: 13px;
    color: var(--text-light);
    text-decoration: line-through;
    display: block;
}

.sticky-buy-bar .buy-now-btn {
    padding: 14px;
    font-size: 16px;
}


/* =============================================
   Order Page Responsive
   ============================================= */

@media (max-width: 900px) {
    .order-top-grid {
        grid-template-columns: 1fr;
        /* Stack columns */
        gap: 20px;
    }
    .order-gallery {
        position: static;
        width: 100%;
        height: auto;
    }
    .order-product-image {
        max-width: 500px;
        margin: 0 auto;
    }
    .order-countdown-box {
        max-width: 500px;
        margin: 20px auto 0 auto;
    }
    .order-buy-box.sticky-bar-active {
        display: none;
    }
}

@media (max-width: 600px) {
    .order-layout-container {
        padding: 15px 15px 80px 15px;
    }
    .order-header h1 {
        font-size: 24px;
    }
    /* === Make selectors stack on mobile === */
    .order-selectors {
        grid-template-columns: 1fr;
    }
    .order-selector input[type="number"] {
        max-width: 120px;
        /* Give quantity a smaller width */
    }
    .order-tabs {
        overflow-x: auto;
        white-space: nowrap;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .order-tabs::-webkit-scrollbar {
        display: none;
    }
}