/* =====================================================================
   You Wish Shop — global compact / polish layer
   Loaded LAST in Website/Layout/master.blade.php so it wins over page CSS.
   ===================================================================== */

/* ---------- base ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font-size: 14px; line-height: 1.55; overflow-x: hidden; }
body img { height: auto; }
body .container { max-width: 1240px; }

/* rich text coming from the admin editor (descriptions, static pages) */
body .description h1, body .description h2, body .description h3,
body .tab-pane h1, body .tab-pane h2, body .tab-pane h3,
body .rich-content h1, body .rich-content h2, body .rich-content h3 {
    font-size: 18px; line-height: 1.35; margin: 10px 0 6px; font-weight: 700;
}
body .description h4, body .description h5, body .description h6,
body .tab-pane h5, body .tab-pane h6 { font-size: 15px; margin: 8px 0 4px; }
body .description p:empty, body .tab-pane p:empty { display: none; }
body .description p { margin-bottom: 8px; }
body .description > :last-child { margin-bottom: 0; }
body .description img, body .tab-pane img { max-width: 100%; height: auto; border-radius: 8px; }
body .description ul, body .description ol { padding-left: 18px; margin-bottom: 8px; }

/* ---------- product details ---------- */
body .product-details-page { padding: 20px 0 30px; }
body .product-details-page .breadcrumb { font-size: 12.5px; flex-wrap: nowrap; overflow: hidden; }
body .product-details-page .breadcrumb .breadcrumb-item.active { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
body .product-info h1 { font-size: 24px; line-height: 1.3; }
body .product-info .price { font-size: 24px; }
body .product-info .description { font-size: 14px; line-height: 1.7; margin: 12px 0; max-height: none; }
body .product-info .meta-item { font-size: 14px; }
body .product-info .action-row,
body .product-info .mt-3.d-flex { gap: 10px; flex-wrap: nowrap !important; }
body .btn-add-cart { margin-top: 0; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
body .btn-wishlist { margin-left: 0; display: inline-flex; align-items: center; justify-content: center; }
body .product-tabs { margin-top: 24px; }
body .product-tabs .tab-content { padding: 20px; }
body .related-products h3 { font-size: 20px; }

/* ---------- generic page headers ---------- */
body .page-header h1,
body .category-header h1,
body .cart-page .page-header h1,
body .checkout-page .page-header h1,
body .search-results-page .search-hero h1 { font-size: 26px; }

/* =====================================================================
   TABLET  (≤ 991px)
   ===================================================================== */
@media (max-width: 991.98px) {
    body .sec .sec-head h2, body .deals-section .sec-head h2, body .gallery-section .sec-head h2,
    body .offers-section .sec-head h2, body .testimonial-section .sec-head h2,
    body .pc-sec-head h2, body .promo-sec-head h2, body .section-title, body .about-title { font-size: 24px !important; }
}

/* =====================================================================
   MOBILE  (≤ 767px)
   ===================================================================== */
@media (max-width: 767.98px) {
    body { font-size: 13px; }
    body .container, body .container-fluid { padding-left: 12px; padding-right: 12px; }

    /* headings */
    body h1 { font-size: 20px; }
    body h2 { font-size: 18px; }
    body h3 { font-size: 16px; }
    body h4 { font-size: 15px; }
    body h5 { font-size: 14px; }
    body h6 { font-size: 13px; }

    /* section headings used across home / listing pages */
    body .sec .sec-head h2, body .deals-section .sec-head h2, body .gallery-section .sec-head h2,
    body .offers-section .sec-head h2, body .testimonial-section .sec-head h2,
    body .pc-sec-head h2, body .promo-sec-head h2, body .section-title, body .about-title { font-size: 18px !important; line-height: 1.3; }
    body .page-header h1, body .category-header h1, body .brand-header h1, body .brand-header .brand-info h1,
    body .cart-page .page-header h1, body .checkout-page .page-header h1,
    body .search-results-page .search-hero h1 { font-size: 19px !important; line-height: 1.3; }
    body .page-header { margin-bottom: 16px !important; }
    body .page-header p, body .category-header p { font-size: 12.5px; }

    /* big decorative icons in empty states */
    body .empty-cart i, body .no-results i, body .no-reviews i, body .no-banner i { font-size: 36px !important; }
    body .empty-cart h3 { font-size: 17px !important; }

    /* rich text */
    body .description h1, body .description h2, body .description h3,
    body .tab-pane h1, body .tab-pane h2, body .tab-pane h3,
    body .rich-content h1, body .rich-content h2, body .rich-content h3 { font-size: 15px; }
    body .description h4, body .description h5, body .description h6,
    body .tab-pane h4, body .tab-pane h5, body .tab-pane h6 { font-size: 14px; }

    /* buttons & forms */
    body .btn { font-size: 13px; }
    body .btn-lg { font-size: 14px; padding: 9px 18px; }
    body .form-control, body .form-select { font-size: 13.5px; }
    body .form-label { font-size: 12.5px; }

    /* ---------- product details ---------- */
    body .product-details-page { padding: 10px 0 20px; }
    body .product-details-page .breadcrumb { font-size: 11px; margin-bottom: 0; }
    body .product-details-page nav.mb-3 { margin-bottom: 8px !important; }
    body .product-gallery { position: static; margin-bottom: 14px; }
    body .product-gallery .main-image { height: auto !important; aspect-ratio: 1 / 1; max-height: 360px; border-radius: 10px; }
    body .product-gallery .main-image img { padding: 10px; }
    body .product-gallery .thumbnails { gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    body .product-gallery .thumbnails::-webkit-scrollbar { display: none; }
    body .product-gallery .thumbnails .thumb { width: 56px; height: 56px; flex-shrink: 0; border-radius: 6px; }

    body .product-info h1 { font-size: 16px !important; line-height: 1.35; margin-bottom: 4px; }
    body .product-info .sku { font-size: 11.5px; margin-bottom: 4px; }
    body .product-info .price { font-size: 19px !important; margin: 6px 0; }
    body .product-info .price .original { font-size: 13px; margin-right: 6px; }
    body .product-info .price .discount { font-size: 12px; }
    body .product-info .stock-status { font-size: 11.5px; padding: 3px 10px; }
    body .product-info .description { font-size: 13px; line-height: 1.6; margin: 10px 0; }
    body .product-info .meta-item { flex-direction: row !important; align-items: center; padding: 7px 0; font-size: 13px; }
    body .product-info .meta-item .label { width: 90px !important; font-size: 12.5px; }
    body .product-info .meta-item .value .badge-category,
    body .product-info .meta-item .value .badge-attribute { font-size: 11px; padding: 2px 10px; }

    body .btn-add-cart { flex: 1; height: 44px; padding: 0 16px !important; font-size: 14px !important; border-radius: 10px; }
    body .btn-wishlist { width: 44px; min-width: 44px; height: 44px; padding: 0 !important; border-radius: 10px; flex-shrink: 0; }

    body .product-tabs { margin-top: 18px; border-radius: 10px; }
    body .product-tabs .nav-tabs { flex-wrap: nowrap; }
    body .product-tabs .nav-tabs .nav-item { flex: 1; }
    body .product-tabs .nav-tabs .nav-link { width: 100%; padding: 9px 8px !important; font-size: 13px !important; white-space: nowrap; }
    body .product-tabs .nav-tabs .nav-link i { margin-right: 5px !important; }
    body .product-tabs .tab-content { padding: 14px 12px; }
    body .product-tabs .tab-content .tab-pane h4 { font-size: 15px !important; margin-bottom: 10px; }
    body .product-tabs .tab-content .tab-pane h4 + div span[style*="font-size:20px"] { font-size: 16px !important; }
    body .no-reviews { padding: 16px 8px; font-size: 13px; }
    body .review-item { padding: 10px 0; }
    body .review-item .review-comment { font-size: 13px; }

    body .related-products { margin-top: 24px; }
    body .related-products h3 { font-size: 17px !important; margin-bottom: 12px; }
    body .related-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    body .related-card { border-radius: 10px; }
    body .related-card .image { height: auto !important; aspect-ratio: 1 / 1; }
    body .related-card .info { padding: 8px; }
    body .related-card .info h6 { font-size: 12px; height: 31px; }
    body .related-card .info .price { font-size: 13px; }

    /* ---------- generic product cards / grids ---------- */
    body .product-card .product-title, body .product-card .product-info h5 { font-size: 12px; }
    body .product-grid { gap: 10px !important; }

    /* ---------- cart / checkout ---------- */
    body .cart-page, body .checkout-page { padding-top: 14px !important; padding-bottom: 20px !important; }
    body .btn-place-order { font-size: 14px !important; padding: 12px !important; }

    /* ---------- footer ---------- */
    body footer { font-size: 12.5px; }
    body footer h5, body footer h6, body footer .footer-title { font-size: 14px !important; margin-bottom: 8px !important; }

    /* ---------- sweetalert on small screens ---------- */
    body .swal2-popup { font-size: 13px; width: 88% !important; padding: 16px !important; }
    body .swal2-title { font-size: 18px !important; }
    body .swal2-icon { transform: scale(.75); margin: 10px auto 0 !important; }
}

/* =====================================================================
   SMALL PHONES  (≤ 400px)
   ===================================================================== */
@media (max-width: 400px) {
    body .container, body .container-fluid { padding-left: 10px; padding-right: 10px; }
    body .product-info h1 { font-size: 15px !important; }
    body .product-info .price { font-size: 17px !important; }
    body .product-tabs .nav-tabs .nav-link { font-size: 12px !important; }
}
