/* Checkout Form Styles */
.feedback-form input, .feedback-form textarea {background-color: inherit !important;}

.osmani-grid-2 {
    display: grid !important;
    grid-template-columns: repeat(1, 1fr) !important;
    gap: 16px;
    justify-items: stretch;
    align-items: start;
}

/* Ensure form fields properly utilize the grid */
.osmani-grid-2 .form-row {
    width: 100% !important;
    margin-bottom: 0 !important;
}

.osmani-grid-2 .form-row.form-row-wide {
    grid-column: 1 / -1;
}

.osmani-grid-2 .form-row label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}

.osmani-grid-2 .form-row input,
.osmani-grid-2 .form-row select,
.osmani-grid-2 .form-row textarea {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .osmani-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
}

/* Fix for checkout billing fields */
.woocommerce-checkout .billing-details-box .osmani-grid-2 {
    display: grid !important;
}

/* Ensure proper spacing for form elements */
.woocommerce-checkout .form-row {
    padding: 0;
    margin: 0 0 16px 0;
}

/* Fix for select2 dropdowns in grid */
.osmani-grid-2 .select2-container {
    width: 100% !important;
}

/* Ensure proper field ordering */
.osmani-grid-2 .form-row:nth-child(odd) {
    grid-column: 1;
}

.osmani-grid-2 .form-row:nth-child(even) {
    grid-column: 2;
}

@media (max-width: 768px) {
    .osmani-grid-2 .form-row:nth-child(odd),
    .osmani-grid-2 .form-row:nth-child(even) {
        grid-column: 1;
    }
}

/* Checkout Layout */
.checkout-layout {
    display: grid !important;
    grid-template-columns: 2fr 1fr !important;
    gap: 24px !important;
    align-items: start !important;
    width: 100% !important;
}

/* Ensure checkout form takes full width */
.checkout.woocommerce-checkout {
    width: 100% !important;
    max-width: none !important;
}

.checkout-col {
    display: block !important;
    width: 100% !important;
    float: none !important;
    clear: none !important;
}

.checkout-col--form {
    grid-column: 1 !important;
    width: 100% !important;
}

.checkout-col--summary {
    grid-column: 2 !important;
    width: 100% !important;
}

.checkout-col--summary .order-review-box {
    position: sticky;
    top: 120px;
}

.checkout-page-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

.checkout-layout {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) !important;
}

.checkout-col {
    min-width: 0;
}

.shipping-options {
    flex-wrap: wrap;
}

.shipping-option {
    min-width: 260px;
}

.payment-actions {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.payment-summary__row {
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}

.woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
    padding: 0.9rem 0.6rem;
    border-bottom: 1px solid #eee;
    text-align: right;
    vertical-align: middle;
    white-space: normal;
    word-break: break-word;
}

.woocommerce-checkout-review-order-table thead th {
    font-weight: 700;
    color: #3d3d3d;
}

.woocommerce-checkout-review-order-table tfoot td {
    font-weight: 600;
}

.woocommerce-checkout-review-order-table .woocommerce-shipping-methods {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.woocommerce-checkout-review-order-table .woocommerce-shipping-methods li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    line-height: 1.6;
}

.woocommerce-checkout-review-order-table .woocommerce-shipping-methods input {
    margin-top: 0.35rem;
}

.woocommerce-checkout-review-order-table .woocommerce-shipping-methods label {
    display: block;
    width: 100%;
}

.woocommerce-checkout-payment {
    margin-top: 1.5rem;
    background: #f7f3ed;
    border-radius: 1rem;
    padding: 1.5rem;
}

.woocommerce-checkout-payment ul.payment_methods {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.woocommerce-checkout-payment li.wc_payment_method {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 0.85rem;
    padding: 1rem;
}

.woocommerce-checkout-payment .payment_box {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 0.85rem;
    padding: 1rem;
    margin-top: 0.75rem;
}

.woocommerce-checkout #place_order,
.woocommerce-checkout button.button.alt {
    background: #64b157;
    color: #fff;
    border: none;
    border-radius: 2rem;
    padding: 0.9rem 2.5rem;
    font-weight: 700;
    cursor: pointer;
}

.woocommerce-checkout .form-row-first,
.woocommerce-checkout .form-row-last {
    float: none;
    width: 100%;
}

.checkout-box {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 16px;
    padding: 20px;
}

.shipping-payment-box__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.shipping-payment-box__header h3 {
    margin: 0;
    font-size: 18px;
}

/* Responsive Checkout */
@media (max-width: 768px) {
    .checkout-layout {
        grid-template-columns: 1fr !important;
    }
    .checkout-col--form {
        grid-column: 1 !important;
    }
    .checkout-col--summary {
        grid-column: 1 !important;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .checkout-layout {
        grid-template-columns: 1.5fr 1fr !important;
        gap: 20px !important;
    }
}

/* Suggested Products Slider */
.suggested-products-box {
    margin-top: 2rem;
}

.suggested-products__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
}

.suggested-products__header h3 {
    margin: 0;
}

.suggested-products-slider {
    margin-top: 1rem;
}

/* Address Box */
.address-box__current {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
}

.address-box__icon {
    font-size: 1.5rem;
    color: #666;
}

.address-box__info h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.address-box__info p {
    margin: 0;
    color: #666;
}

/* WooCommerce Cart RTL layout fixes and responsive improvements */
.woocommerce .cart-collaterals .cart_totals,
.woocommerce-page .cart-collaterals .cart_totals {
    float: left !important;
    width: 48% !important;
}
@media (max-width: 1024px) {
    .woocommerce-cart .cart-collaterals .cart_totals,
    .woocommerce .cart-collaterals .cart_totals,
    .woocommerce-page .cart-collaterals .cart_totals {
        width: 100% !important;
        float: none !important;
    }
    .woocommerce .cart-collaterals,
    .woocommerce-page .cart-collaterals {
        display: block !important;
    }
}

@media (max-width: 768px) {
    .woocommerce-cart .cart-collaterals,
    .woocommerce .cart-collaterals,
    .woocommerce-page .cart-collaterals {
        padding: 0 12px;
    }
    .woocommerce-cart .cart-collaterals .cart_totals .shop_table,
    .woocommerce .cart-collaterals .cart_totals .shop_table,
    .woocommerce-page .cart-collaterals .cart_totals .shop_table {
        width: 100% !important;
    }
}

.woocommerce .cart-collaterals .cross-sells,
.woocommerce-page .cart-collaterals .cross-sells {
    float: right !important;
    width: 48% !important;
    clear: both !important;
}

@media (max-width: 1024px) {
    .woocommerce .cart-collaterals .cross-sells,
    .woocommerce-page .cart-collaterals .cross-sells {
        width: 100% !important;
        float: none !important;
    }
}

@media (max-width: 768px) {
    .woocommerce .cart-collaterals .cross-sells,
    .woocommerce-page .cart-collaterals .cross-sells {
        padding: 0 12px;
    }
    .woocommerce-cart .cart-collaterals .cross-sells ul.products,
    .woocommerce .cart-collaterals .cross-sells ul.products,
    .woocommerce-page .cart-collaterals .cross-sells ul.products {
        width: 100% !important;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .woocommerce .cart-collaterals .cart_totals,
    .woocommerce-page .cart-collaterals .cart_totals {
        width: 100% !important;
        float: none !important;
    }
}

/* Hero slider responsive layout */
.hero {position: relative; width: 100%; overflow: hidden;}
.hero .swiper {width: 100%;}
.hero .swiper-wrapper {height: 100%;}
.hero .swiper-slide {position: relative; width: 100%;}
.hero__bg-layer {position: absolute; inset: 0; background-size: cover; background-position: center; background-color: #000;}
.hero__model-img {position: absolute; bottom: 0; right: 4%; max-width: 42%; height: auto; object-fit: contain; z-index: 1; pointer-events: none;}
.hero__text {position: relative; z-index: 10; width: 90%; max-width: 720px; margin-inline: auto; padding: 16px; text-align: center;}
.hero__title {font-weight: 700; line-height: 1.2;}
.hero__description {line-height: 1.7;}
.hero-next, .hero-prev {width: 42px; height: 42px;}
.hero__title, .hero__description { direction: rtl !important; unicode-bidi: plaintext; display: block; visibility: visible; }
.hero__title { color: #ffffff !important; }
.hero__description { color: #e5e7eb !important; }

.hero .swiper-slide .hero__text { opacity: 0; transform: translateY(12px); transition: opacity .3s ease, transform .3s ease; will-change: opacity, transform; }
.hero .swiper-slide-active .hero__text { opacity: 1 !important; transform: none !important; }
.hero .swiper-slide-next .hero__text,
.hero .swiper-slide-prev .hero__text { opacity: 0 !important; transform: translateY(12px) !important; }
.hero .swiper-slide:not(.swiper-slide-active) .hero__text { opacity: 0 !important; transform: translateY(12px) !important; }

/* Ensure text layer always above model image */
.hero .hero__text { z-index: 20 !important; }
.hero .hero__model-img { z-index: 5 !important; }

/* Mobile-specific override to avoid absolute positioning jitter */
@media (max-width: 575.98px) {
  .hero .hero__text { position: relative !important; left: auto !important; bottom: auto !important; transform: none !important; width: 92% !important; margin-inline: auto !important; text-align: center !important; }
  .hero .hero__model-img { z-index: 1 !important; }
}

.hero .hero-slider,
.hero .hero-slider .swiper,
.hero .hero-slider .swiper-wrapper { direction: ltr !important; }

@media (max-width: 575.98px) {
  .hero {min-height: 420px;}
  .hero .swiper {min-height: 420px;}
  .hero .swiper-wrapper {min-height: 420px;}
  .hero .swiper-slide {min-height: 420px;}
  .hero__model-img {max-width: 58%; right: 2%;}
  .hero__text {width: 94%; padding: 12px;}
  .hero__title {font-size: 22px;}
  .hero__description {font-size: 14px;}
  .hero-next, .hero-prev {width: 36px; height: 36px;}
}
@media (min-width: 576px) and (max-width: 767.98px) {
  .hero {min-height: 480px;}
  .hero .swiper {min-height: 480px;}
  .hero .swiper-wrapper {min-height: 480px;}
  .hero .swiper-slide {min-height: 480px;}
  .hero__model-img {max-width: 52%;}
  .hero__title {font-size: 26px;}
  .hero__description {font-size: 15px;}
}
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero {min-height: 560px;}
  .hero .swiper {min-height: 560px;}
  .hero .swiper-wrapper {min-height: 560px;}
  .hero .swiper-slide {min-height: 560px;}
  .hero__model-img {max-width: 46%;}
  .hero__text {text-align: start;}
  .hero__title {font-size: 32px;}
  .hero__description {font-size: 16px;}
}
@media (min-width: 992px) {
  .hero {min-height: 640px;}
  .hero .swiper {min-height: 640px;}
  .hero .swiper-wrapper {min-height: 640px;}
  .hero .swiper-slide {min-height: 640px;}
  .hero__model-img {max-width: 40%;}
  .hero__text {text-align: start;}
  .hero__title {font-size: 38px;}
  .hero__description {font-size: 17px;}
}
@media (min-width: 1200px) {
  .hero {min-height: 720px;}
  .hero .swiper {min-height: 720px;}
  .hero .swiper-wrapper {min-height: 720px;}
  .hero .swiper-slide {min-height: 720px;}
  .hero__title {font-size: 44px;}
  .hero__description {font-size: 18px;}
}

/* Story thumbnails grid */
.story-section {display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 12px;}
.story-section .story-item {display: flex; flex-direction: column; align-items: center; gap: 8px;}
.story-section .story-item__img-wrapper {width: 100%; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden;}
.story-section .story-item__img-wrapper img {width: 100%; height: 100%; object-fit: cover;}
.story-section .story-item span {font-size: 12px; max-width: 100%; text-align: center;}
@media (min-width: 768px) { .story-section {grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 14px;} }
@media (min-width: 992px) { .story-section {grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px;} }

/* Story viewer overlay responsive */
.story-viewer-overlay {position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 100003; display: none;}
.story-viewer-overlay.active {display: flex !important; align-items: center; justify-content: center;}
.story-viewer-container {width: 100%; max-width: 1100px; padding: 16px;}
.story-viewer-main {width: 100%;}
.story-viewer-slider {width: 100%; height: 72vh;}
.story-viewer-slider .swiper-slide {display: flex; align-items: center; justify-content: center;}
.story-slide-content {position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;}
.story-slide-image {max-width: 100%; max-height: 100%; object-fit: contain;}
.story-progress-bar {position: absolute; left: 10%; right: 10%; bottom: 12px; height: 3px; background: rgba(255,255,255,.25); border-radius: 3px;}
.story-progress {height: 3px; width: 0%; background: #fff; border-radius: 3px;}
.story-navigation {position: absolute; inset-inline: 0; top: 50%; transform: translateY(-50%); display: flex; justify-content: space-between; pointer-events: none;}
.story-nav-btn {pointer-events: auto; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; color: #fff;}
.story-thumbnails-container {margin-top: 12px; display: flex; gap: 8px; overflow-x: auto;}
.story-bottom-thumb {width: 68px; height: 68px; object-fit: cover; border-radius: 10px; opacity: .7;}
.story-bottom-thumb.active {opacity: 1; outline: 2px solid #fff;}
@media (max-width: 575.98px) { .story-viewer-slider {height: 64vh;} .story-bottom-thumb {width: 58px; height: 58px;} }
@media (min-width: 768px) { .story-viewer-slider {height: 76vh;} .story-bottom-thumb {width: 72px; height: 72px;} }

/* Brand logo slider images */
.brand-logo-slider .swiper-slide img {height: 40px; object-fit: contain;}
@media (min-width: 768px) { .brand-logo-slider .swiper-slide img {height: 52px;} }
@media (min-width: 992px) { .brand-logo-slider .swiper-slide img {height: 64px;} }

/* Category carousel image sizing */
.category-carousel .swiper-slide img {width: 100%; height: auto; object-fit: contain;}
.category-carousel__text-overlay {pointer-events: none;}
