/* ==========================================================================
   Ways of Tarot — global mobile / responsive patch
   Loaded AFTER site.css files, BEFORE page level @stack('styles').
   Every rule here uses !important on purpose: the base theme ships
   fixed heights / fixed widths that break the layout below 992px.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. HEADER
   The bundled theme forces `.header` to a fixed 65px (<=991px) / 54px
   (<=400px) height. Our header (logo row + actions row + menu) needs ~190px,
   so the extra content was spilling out and painting ON TOP of every page.
   -------------------------------------------------------------------------- */
.header {
    height: auto !important;
    min-height: 0 !important;
    position: relative;
    z-index: 120;
    display: block;
    overflow: visible;
}

/* logo + actions must never break onto a second row */
.header .top-navbar .container {
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.header .top-navbar .container > * {
    flex: 0 0 auto;
    min-width: 0;
}

.header .top-navbar img {
    width: auto !important;
    height: auto !important;
    max-width: min(200px, 34vw) !important;
}

.header .top-navbar .global-search-wrapper {
    margin: 0 !important;
    flex: none;
}

.header .top-navbar .global-search-toggle {
    padding: 6px 8px !important;
    font-size: 18px;
    line-height: 1;
}

.header .top-navbar .btn.ml-3 {
    margin-left: 10px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.header .top-navbar .loginSignUp {
    white-space: nowrap;
    font-size: 15px;
    line-height: 1.2;
}

/* on mobile the second nav only holds the collapsed menu – remove its
   empty padding strip when the menu is closed */
@media (max-width: 991.98px) {
    .header > nav.navbar:not(.top-navbar) {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin: 0;
    }

    .header > nav.navbar:not(.top-navbar) .navbar-collapse {
        padding: 6px 0 16px;
    }

    .header > nav.navbar:not(.top-navbar) .navbar-collapse .nav-link {
        padding-top: 10px;
        padding-bottom: 10px;
    }
}

/* keep the mobile menu button reachable / correctly sized */
.header .navbar-toggler {
    padding: 4px 6px;
    border: 0;
    margin-left: 0 !important;
    flex: none;
}

/* --------------------------------------------------------------------------
   2. TOP OFFER BANNER
   -------------------------------------------------------------------------- */
.banner-content {
    gap: 10px;
}

.banner-left {
    flex: 1 1 auto;
    min-width: 0;
    gap: 8px !important;
}

.banner-text {
    display: block;
}

@media (max-width: 576px) {
    .top-banner {
        padding: 8px 12px !important;
    }

    .banner-text {
        font-size: 13px !important;
        line-height: 1.35 !important;
    }

    .banner-btn {
        padding: 7px 11px !important;
        font-size: 12.5px !important;
        border-radius: 10px !important;
        flex: none;
        white-space: nowrap;
    }
}

/* --------------------------------------------------------------------------
   3. FOOTER
   Long unbreakable strings (e-mail ids such as contact@waysoftarot.com)
   were 187px wide inside a 153px column -> they pushed the whole page
   sideways on every single page.
   -------------------------------------------------------------------------- */
.footer-link {
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    max-width: 100%;
}

#footer [class*="col-"],
#footer .col-6 {
    min-width: 0;
}

#footer .footer-list li {
    margin-bottom: 6px;
    min-width: 0;
}

#footer .footer-list,
#footer .footer-list li {
    max-width: 100%;
}

#footer .footer-bottom-links {
    display: inline-block;
    max-width: 100%;
}

@media (max-width: 576px) {
    #footer .text-center {
        line-height: 2.1;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    #footer h5 {
        font-size: 15px;
    }

}

/* --------------------------------------------------------------------------
   4. GENERIC SAFETY NET
   -------------------------------------------------------------------------- */
img,
video {
    max-width: 100%;
    height: auto;
}

.wrapper {
    max-width: 100%;
    /* long unbreakable strings (mail ids, urls, hashtags) must wrap
       instead of dragging the whole page sideways.
       `anywhere` (not break-word) also shrinks the min-content size so
       flex items are allowed to actually shrink. */
    overflow-wrap: anywhere;
    word-break: break-word;
}

body {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* --------------------------------------------------------------------------
   5. PAGE SPECIFIC
   -------------------------------------------------------------------------- */

/* matchKundali: .preview-section also carries .row -> negative side margins */
.preview-section.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.preview-section {
    min-width: 0;
}

@media (max-width: 767px) {
    .preview-section {
        flex: 1 1 auto !important;
    }
}

/* --------------------------------------------------------------------------
   6. USER DASHBOARD / PROFILE / WALLET / CHAT  (layouts/app.blade.php)
   The bar is a single fixed-height flex row, so on a phone the logo, the
   three nav links and the user pill were all fighting for the same space.
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
    .app-navbar {
        height: auto !important;
        min-height: 56px;
        flex-wrap: wrap;
        padding: 8px 12px !important;
        gap: 6px;
        position: sticky;
    }

    .app-logo {
        font-size: 15px;
        gap: 7px;
        min-width: 0;
        overflow: hidden;
    }

    .app-logo img {
        height: 36px;
    }

    .app-logo span {
        max-width: 40vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: space-between;
        gap: 4px;
        overflow-x: auto;
        scrollbar-width: none;
        padding-bottom: 2px;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-links a {
        padding: 8px 9px;
        font-size: 13px;
        white-space: nowrap;
    }

    .nav-right {
        margin-left: auto;
        gap: 6px;
    }

    .nav-user {
        padding: 5px 9px 5px 5px;
    }

    .nav-user span {
        max-width: 92px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dropdown-menu {
        right: 10px;
        top: 54px;
        min-width: 170px;
    }

    .app-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .page-header {
        padding: 14px 15px;
    }
}

/* --------------------------------------------------------------------------
   7. SITE ADMIN  (admin/layout.blade.php)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
    .wrap {
        padding: 16px 13px 44px !important;
    }

    .card-b {
        padding: 14px !important;
    }

    .card-h {
        padding: 13px 14px;
        font-size: 14.5px;
    }

    .topbar {
        padding-left: 13px;
        padding-right: 13px;
    }

    .stats {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .grid,
    .grid.cards {
        grid-template-columns: 1fr;
    }

    /* let wide admin tables scroll instead of pushing the page */
    .table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* --------------------------------------------------------------------------
   8. `form-select` (Bootstrap 5 class) ON A BOOTSTRAP 4 THEME
   The site loads Bootstrap 4 CSS, which has no `.form-select` rule. The
   <select> therefore fell back to the browser default — inline-block,
   shrink-to-fit — so it hugged its label and "All Categories" / "Newest
   first" read as one jammed line in the shop filter panel.
   -------------------------------------------------------------------------- */
.form-select {
    display: block;
    width: 100%;
    min-height: calc(1.5em + 0.75rem + 2px);
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-select-sm {
    min-height: calc(1.5em + 0.5rem + 2px);
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    padding-left: 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}

/* filter labels sit ON their control instead of glued to it */
.shop-filters > label {
    display: block;
    margin-bottom: 6px;
}

.shop-filters {
    min-width: 0;
}

/* --------------------------------------------------------------------------
   9. SHOP / PUJA PRODUCT CARDS
   app.css ships `.card { margin: 20px; padding: 20px 10px }` (a chat-widget
   style). On the shop grid that shrank a 265px column down to a 225px card,
   padded the photo away from the card edge and threw the card out of line
   with the "All Products" heading above it.
   -------------------------------------------------------------------------- */
.shop-card {
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #ece9f4 !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 1px 3px rgba(36, 21, 66, 0.06) !important;
    overflow: hidden;
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.shop-card:hover {
    box-shadow: 0 10px 26px rgba(36, 21, 66, 0.16) !important;
    transform: translateY(-3px);
}

.shop-card img {
    display: block;
}

/* --------------------------------------------------------------------------
   10. PUJA SERVICES  (/puja-services + /puja-services/{slug})
   Cards reuse `.shop-card` (section 9); these are the bits inside it.
   -------------------------------------------------------------------------- */
.puja-media {
    position: relative;
    line-height: 0;
}

.puja-media img {
    display: block;
    width: 100%;
    height: 172px;
    object-fit: cover;
    background: #f7f5fb;
}

.puja-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #604485;
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 6px;
    line-height: 1.4;
}

.puja-duration {
    position: absolute;
    left: 8px;
    bottom: 8px;
    background: rgba(36, 21, 66, 0.82);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 7px;
    line-height: 1.4;
}

.puja-body {
    padding: 12px 13px 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.puja-cat {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.puja-name {
    font-size: 15px;
    font-weight: 700;
    color: #241142;
    margin: 5px 0 6px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.puja-desc {
    font-size: 12.5px;
    color: #8b8fa3;
    margin: 0 0 8px;
    line-height: 1.45;
}

.puja-price {
    font-size: 17px;
    font-weight: 800;
    color: #604485;
    margin-bottom: 10px;
}

.puja-price.is-req {
    font-size: 12.5px;
    font-weight: 700;
    color: #8b8fa3;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.puja-cta {
    display: block;
    width: 100%;
    text-align: center;
    background: #604485;
    color: #fff !important;
    border: 0;
    border-radius: 9px;
    padding: 9px;
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none !important;
    transition: background 0.2s ease;
}

.puja-cta:hover,
.puja-cta:focus {
    background: #4c2d7a;
}

/* detail page */
.puja-hero {
    border: 1px solid #ece9f4;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    min-width: 0;
}

.puja-hero img {
    display: block;
    width: 100%;
    height: 340px;
    object-fit: cover;
    background: #f7f5fb;
}

.puja-longdesc {
    color: #5b5f74;
    font-size: 15.5px;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.puja-longdesc p {
    margin: 0 0 14px;
}

.puja-longdesc h2,
.puja-longdesc h3,
.puja-longdesc h4 {
    color: #361563;
    font-size: 20px;
    font-weight: 700;
    margin: 24px 0 10px;
}

.puja-longdesc ul,
.puja-longdesc ol {
    padding-left: 20px;
    margin: 0 0 14px;
}

.puja-longdesc li {
    margin-bottom: 6px;
}

.puja-longdesc img {
    border-radius: 12px;
}

@media (max-width: 576px) {
    .puja-media img {
        height: 150px;
    }

    .puja-hero img {
        height: 230px;
    }

    .puja-name {
        font-size: 14.5px;
    }
}
