/*
 * Aayurdham storefront refresh, Phases 1 to 6
 * Phase 1: colors, base type, buttons, header polish, footer.
 * Phase 2: product cards, listing toolbar, price filter (sections 8 to 11).
 * Phase 3: product page (sections 12 to 16). The image zoom is NOT touched.
 * Phase 4: cart and checkout (sections 17 to 20). CSS only, no template edits.
 * Phase 5: login, sign up, OTP login, account pages (sections 21 to 25). CSS only.
 * Phase 6: homepage carousels, banners, section spacing (sections 26 to 28). CSS only.
 *
 * Loads AFTER velocity.css, so it only overrides; nothing in velocity.css,
 * velocity.js or the Velocity/Shop packages is edited.
 * Rollback: remove the <link> to this file from layouts/master.blade.php.
 *
 * Each numbered section below is independent. If one section misbehaves on
 * your site, delete just that section (from its heading to the next one).
 */

/* ------------------------------------------------------------------
   0. Design tokens (change a color here and it changes everywhere below)
   ------------------------------------------------------------------ */
:root {
    --ay-brand: #76bc1b;        /* logo green, unchanged */
    --ay-brand-hover: #68a817;  /* slightly deeper, hover state only */
    --ay-brand-deep: #4a8010;   /* readable green for text and outlines on white */
    --ay-brand-tint: #f2f8e8;   /* very light green for hover backgrounds */
    --ay-ink: #1f2a10;          /* body and button text */
    --ay-ink-soft: #5b6650;     /* secondary text */
    --ay-line: #e3e8d9;         /* thin borders */
    --ay-radius: 6px;
}

/* ------------------------------------------------------------------
   1. Base type
   Keeps Source Sans Pro (already loaded). Slightly larger, calmer text.
   ------------------------------------------------------------------ */
body {
    color: var(--ay-ink);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* velocity.css sets 14px here; 15px is easier to read without reflowing the header */
.main-content-wrapper {
    font-size: 15px;
}

h1, h2, h3, h4 {
    color: var(--ay-ink);
    line-height: 1.25;
}

/* ------------------------------------------------------------------
   2. Keyboard focus (accessibility): visible ring for keyboard users only
   ------------------------------------------------------------------ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--ay-brand-deep) !important;
    outline-offset: 2px;
}

/* ------------------------------------------------------------------
   3. Buttons
   Before: white text on light green (hard to read). After: dark text on
   the exact logo green, larger tap area, consistent shape.
   ------------------------------------------------------------------ */
.theme-btn:not(.light),
.btn-add-to-cart,
.btn-dark-green,
.btn-normal {
    background-color: var(--ay-brand) !important;
    border-color: var(--ay-brand) !important;
    color: var(--ay-ink) !important;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    border-radius: var(--ay-radius) !important;
    min-height: 44px;
}

/* velocity.css forces 3px 14px padding on card buttons; give them a proper tap size */
.btn-add-to-cart {
    padding: 10px 16px !important;
}

/* icons and spans inside buttons follow the button text color */
.btn-add-to-cart i,
.btn-add-to-cart span,
.btn-add-to-cart .material-icons,
.theme-btn:not(.light) i,
.theme-btn:not(.light) .material-icons {
    color: inherit !important;
}

.theme-btn:not(.light):hover,
.theme-btn:not(.light):focus,
.btn-add-to-cart:hover,
.btn-add-to-cart:focus,
.btn-dark-green:hover,
.btn-normal:hover {
    background-color: var(--ay-brand-hover) !important;
    border-color: var(--ay-brand-hover) !important;
    color: var(--ay-ink) !important;
}

/* outlined buttons (Update Cart, Apply Coupon, Edit, Sign up, ...) */
.theme-btn.light {
    background-color: #fff !important;
    color: var(--ay-brand-deep) !important;
    border: 1px solid var(--ay-brand) !important;
    box-shadow: none !important;
    font-weight: 700;
    border-radius: var(--ay-radius) !important;
    min-height: 44px;
}

.theme-btn.light:hover,
.theme-btn.light:focus {
    background-color: var(--ay-brand-tint) !important;
    color: var(--ay-brand-deep) !important;
}

/* disabled buttons keep their existing faded look */
.theme-btn[disabled],
.theme-btn.disabled,
.btn-add-to-cart[disabled],
.btn-add-to-cart.disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ------------------------------------------------------------------
   4. Badges (cart count, Sale tag): dark text on green
   ------------------------------------------------------------------ */
.badge-container .badge,
#mini-cart .badge,
.mini-cart-container #mini-cart .badge,
.cart-btn-collection button[type=button].btn-secondary #cart-count,
.product-price .sticker.sale,
.sale-btn {
    color: var(--ay-ink) !important;
    font-weight: 700;
}

/* ------------------------------------------------------------------
   5. Header polish (desktop). No size or position changes.
   ------------------------------------------------------------------ */
header.sticky-header.header-shadow {
    box-shadow: 0 2px 10px rgba(31, 42, 16, .12);
}

.searchbar .form-control:focus,
#search-form .form-control:focus {
    border-color: var(--ay-brand) !important;
    box-shadow: 0 0 0 3px rgba(118, 188, 27, .30) !important;
}

#header-search-icon:hover {
    color: var(--ay-brand-deep);
}

/* menu and dropdown hover: velocity.css paints these green with white text */
.main-content-wrapper .content-list ul li:hover,
.main-content-wrapper .content-list ul li:hover a,
.dropdown-menu li a:hover,
.dropdown-menu li a:focus {
    color: var(--ay-ink) !important;
}

/* ------------------------------------------------------------------
   6. Footer
   ------------------------------------------------------------------ */
.footer .footer-content ul li {
    padding: 4px 0;
}

.footer .footer-content ul li a {
    color: var(--ay-ink);
    font-size: 15px;
}

.footer .footer-content ul li a:hover,
.footer .footer-content ul li a:focus {
    color: var(--ay-brand-deep);
    text-decoration: underline;
}

.subscriber-form-div .subscribe-field {
    min-height: 44px;
    border-radius: var(--ay-radius) 0 0 var(--ay-radius);
}

/* must stay after section 3 so the joined input and button keep a flat middle edge */
.subscriber-form-div .subscribe-btn {
    border-radius: 0 var(--ay-radius) var(--ay-radius) 0 !important;
}

/* the copyright bar had a fixed 60px height that clips when text wraps on phones */
.footer .footer-copy-right {
    height: auto;
    min-height: 60px;
    line-height: 1.5;
    padding: 18px 12px;
    font-size: 15px;
}

/* ------------------------------------------------------------------
   7. Reduced motion: respect the visitor's device setting
   ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==================================================================
   PHASE 2: product cards and listing pages
   Pure CSS. No template, Vue or backend changes.
   ================================================================== */

/* ------------------------------------------------------------------
   8. Product cards (listing pages, search results, related products)
   ------------------------------------------------------------------ */
.product-card-new {
    background: #fff;
    border: 1px solid var(--ay-line) !important;
    border-radius: 8px;
}

.product-card-new:hover {
    box-shadow: 0 4px 14px rgba(31, 42, 16, .12);
}

/* every product image gets the same square box, so rows line up */
.product-card-new .product-image-container img {
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}

/* names: show up to two lines instead of one cut-off line */
.product-card-new .card-body .product-name,
.product-card-new.grid-card .card-body .product-name {
    width: auto;
    max-width: 100%;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
    min-height: 2.6em;
}

/* names were forced to ALL CAPS; the stored name is shown as written */
.grid-card.product-card-new .product-name a span {
    text-transform: none;
}

/* price: clearer, with the old price quieter */
.product-card-new .product-price {
    font-weight: 700;
    color: var(--ay-ink);
}

.product-card-new .product-price .regular-price,
.product-card-new .product-price .price-label {
    color: var(--ay-ink-soft);
    font-weight: 400;
}

/* "Be the first to write a review": hidden on cards that have no reviews.
   Cards with reviews keep their stars and rating count. */
.product-card-new .product-rating > span.fs14:only-child {
    display: none !important;
}

/* ------------------------------------------------------------------
   9. Listing toolbar (grid/list switch, sort, items per page)
   ------------------------------------------------------------------ */
.view-mode .rango-view-grid-container.active,
.view-mode .rango-view-list-container.active {
    border-radius: var(--ay-radius);
}

.view-mode .rango-view-grid-container.active span,
.view-mode .rango-view-list-container.active span {
    color: var(--ay-ink) !important;
}

.toolbar-wrapper select.styled-select {
    border-radius: var(--ay-radius);
    min-height: 40px;
}

/* ------------------------------------------------------------------
   10. Price filter slider
   ------------------------------------------------------------------ */
.vue-slider .vue-slider-process,
.vue-slider .vue-slider-dot-tooltip-inner,
.vue-slider .vue-slider-dot-tooltip-text {
    background-color: var(--ay-brand) !important;
}

.vue-slider .vue-slider-dot-tooltip-inner,
.vue-slider .vue-slider-dot-tooltip-text {
    color: var(--ay-ink) !important;
    font-weight: 700;
}

/* ------------------------------------------------------------------
   11. Small screens: keep card text readable and tap targets large
   ------------------------------------------------------------------ */
@media (max-width: 768px) {
    .product-card-new .card-body .product-name {
        font-size: 15px;
    }

    .product-card-new .btn-add-to-cart {
        min-height: 44px;
    }
}

/* ==================================================================
   PHASE 3: product page
   Works together with three small template edits (see Phase 3 notes):
   Quantity box moved beside Add to Cart (.ay-qty), empty attribute rows
   skipped, one typo fixed. The image zoom is left exactly as it was.
   ================================================================== */

/* ------------------------------------------------------------------
   12. Stock badge: clear, calm, readable (was white text on yellow-green)
   ------------------------------------------------------------------ */
.product-detail .right .info .availability button {
    background: #fdeaea !important;
    color: #8a1f1f !important;
    border: 1px solid #f1b9b9 !important;
    border-radius: 999px !important;
    padding: 4px 14px !important;
    font-weight: 700 !important;
}

.product-detail .right .info .availability button.active {
    background: var(--ay-brand-tint) !important;
    color: var(--ay-brand-deep) !important;
    border: 1px solid #bfe08a !important;
}

/* ------------------------------------------------------------------
   13. Price block
   ------------------------------------------------------------------ */
.product-detail .right .info .price {
    color: var(--ay-ink);
    font-size: 26px;
    font-weight: 700;
    margin: 6px 0 10px;
}

.product-detail .right .info .price .regular-price {
    color: var(--ay-ink-soft);
    font-size: 18px;
    font-weight: 400;
}

/* ------------------------------------------------------------------
   14. Quantity + Add to Cart on one row
   ------------------------------------------------------------------ */
.product-detail .product-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px 18px;
    margin: 6px 0 14px;
}

.product-detail .product-actions > div {
    float: none;
}

.product-detail .ay-qty .quantity {
    width: auto;
    padding-bottom: 0;
}

.product-detail .ay-qty .quantity label {
    float: none;
    display: block;
    padding: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ay-ink-soft);
}

.product-detail .ay-qty .quantity button,
.product-detail .ay-qty .quantity input {
    height: 44px;
}

.product-detail .ay-qty .quantity button {
    min-width: 40px;
}

/* ------------------------------------------------------------------
   15. Description and "More Information" table
   ------------------------------------------------------------------ */
.product-detail .description p,
.product-detail .description {
    line-height: 1.7;
}

.product-detail .description p {
    font-size: 16px;
}

.product-detail .full-specifications {
    width: 100%;
}

.product-detail .full-specifications tr td {
    padding: 9px 12px;
    vertical-align: top;
}

.product-detail .full-specifications tr td:first-child {
    width: 38%;
    padding: 9px 12px;
    color: var(--ay-ink-soft);
}

.product-detail .full-specifications tr:nth-child(odd) {
    background: #f7f8f4;
}

/* ------------------------------------------------------------------
   16. Small screens
   ------------------------------------------------------------------ */
@media (max-width: 768px) {
    .product-detail .right .info .price {
        font-size: 24px;
    }

    .product-detail .full-specifications tr td:first-child {
        width: 45%;
    }
}

/* ==================================================================
   PHASE 4: cart and checkout
   CSS only. The cart and checkout templates carry their own inline
   <style> blocks that load after this file, so the rules below start with
   "body" (and "#checkout") to win on specificity. Checkout logic,
   Razorpay and every form field are untouched.
   ================================================================== */

/* ------------------------------------------------------------------
   17. Cart page
   ------------------------------------------------------------------ */

/* product name no longer runs into the quantity box on desktop */
body .cart-details .product-details-content {
    padding-right: 20px !important;
}

body .cart-details .item-title span.fs20 {
    font-size: 18px;
    line-height: 1.3;
}

body .cart-details .quantity button,
body .cart-details .quantity input {
    height: 44px;
}

body .cart-details .cart-update-btn {
    color: var(--ay-brand-deep);
    border: 1px solid var(--ay-brand);
    border-radius: var(--ay-radius);
    min-height: 44px;
    font-weight: 700;
}

body .cart-details .cart-update-btn:hover,
body .cart-details .cart-update-btn:focus {
    background: var(--ay-brand-tint);
    color: var(--ay-brand-deep);
}

body .cart-details .order-summary .payable-amount {
    font-size: 18px;
}

/* the "free shipping" and "minimum order" notices */
body .cart-details .alert,
body #checkout .order-summary .alert {
    font-size: 14.5px;
    line-height: 1.4;
    border-radius: var(--ay-radius);
}

/* ------------------------------------------------------------------
   18. Checkout steps and forms
   ------------------------------------------------------------------ */
body #checkout .co-btn:not(.co-btn-ghost) {
    background: var(--ay-brand);
    border-color: var(--ay-brand);
    color: var(--ay-ink);
    font-weight: 700;
    border-radius: var(--ay-radius);
    min-height: 48px;
}

body #checkout .co-btn:not(.co-btn-ghost):hover,
body #checkout .co-btn:not(.co-btn-ghost):focus {
    background: var(--ay-brand-hover);
    border-color: var(--ay-brand-hover);
    color: var(--ay-ink);
}

body #checkout .co-btn-ghost {
    border-radius: var(--ay-radius);
    min-height: 48px;
    color: var(--ay-ink);
}

/* step circles: dark icon on the green instead of white */
body #checkout .co-stepper li.active .co-step-dot {
    background: var(--ay-brand);
    border-color: var(--ay-brand);
    color: var(--ay-ink);
}

body #checkout .co-stepper li.done .co-step-dot {
    border-color: var(--ay-brand);
    color: var(--ay-brand-deep);
}

body #checkout .co-step-label {
    font-size: 14px;
}

/* form labels and fields: larger and easier to read */
body #checkout label {
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ay-ink);
}

body #checkout .control:focus {
    border-color: var(--ay-brand);
    box-shadow: 0 0 0 3px rgba(118, 188, 27, .30);
    outline: none;
}

/* ------------------------------------------------------------------
   19. Payment options (Pay Online / Cash On Delivery)
   ------------------------------------------------------------------ */
body #checkout .co-pay-option {
    padding: 16px 18px;
    border-radius: 8px;
}

body #checkout .co-pay-option input {
    width: 20px;
    height: 20px;
    accent-color: var(--ay-brand-deep);
}

body #checkout .co-pay-title {
    font-size: 16px;
    color: var(--ay-ink);
}

body #checkout .co-pay-desc {
    font-size: 14.5px;
    color: var(--ay-ink-soft);
}

body #checkout .co-pay-option.selected {
    border-color: var(--ay-brand-deep);
    box-shadow: 0 0 0 1px var(--ay-brand-deep) inset;
}

/* ------------------------------------------------------------------
   20. Brand strip (Baidyanath, Ayush, Jovees, Dabur) on cart and checkout
   The strip is shrunk, not removed. Uses :has(), so on a very old browser
   this section simply does nothing and the strip stays full size.
   ------------------------------------------------------------------ */
body:has(#checkout, .cart-details) .container-fluid.remove-padding-margin[style*="217 224 36"] {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

body:has(#checkout, .cart-details) .container-fluid.remove-padding-margin[style*="217 224 36"] .mt-3,
body:has(#checkout, .cart-details) .container-fluid.remove-padding-margin[style*="217 224 36"] .mb-3 {
    margin-top: 4px !important;
    margin-bottom: 4px !important;
}

body:has(#checkout, .cart-details) .container-fluid.remove-padding-margin[style*="217 224 36"] img {
    width: auto !important;
    max-width: 100%;
    max-height: 56px;
}

/* ==================================================================
   PHASE 5: login, sign up, OTP login and account pages
   CSS only. Login, Sign up and OTP login share one layout
   (.auth-content), so sections 21 and 22 cover all three pages.
   The Cloudflare check, OTP logic and every form field are untouched.
   ================================================================== */

/* ------------------------------------------------------------------
   21. Login / Sign up / OTP login: header row and card
   ------------------------------------------------------------------ */
.auth-content .heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-bottom: 18px;
}

.auth-content .heading h2 {
    flex: 1 1 auto;
    margin: 0;
}

body .auth-content.form-container .container .heading .btn-new-customer {
    float: none;
}

.auth-content .body {
    background: #fff;
    border: 1px solid var(--ay-line) !important;
    border-radius: 8px;
    padding: 28px !important;
    box-shadow: 0 2px 10px rgba(31, 42, 16, .06);
}

.auth-content .alert {
    border-radius: var(--ay-radius);
    font-size: 15px;
}

/* ------------------------------------------------------------------
   22. Login / Sign up / OTP login: fields and buttons
   ------------------------------------------------------------------ */
.auth-content .label-style {
    font-weight: 600 !important;
    color: var(--ay-ink);
}

.auth-content .form-style {
    height: 46px;
    font-size: 16px;
    color: var(--ay-ink);
    border: 1px solid #c9d1bf;
    border-radius: var(--ay-radius);
}

.auth-content .form-style:focus {
    border-color: var(--ay-brand);
    box-shadow: 0 0 0 3px rgba(118, 188, 27, .30);
    outline: none;
}

.auth-content .theme-btn[type="submit"],
.auth-content #resend-otp-btn {
    min-height: 46px;
    padding-left: 28px;
    padding-right: 28px;
}

.auth-content a.pull-right {
    font-weight: 600;
}

@media (max-width: 575px) {
    .auth-content .heading h2 {
        flex: 1 1 100%;
    }

    .auth-content .body {
        padding: 20px 16px !important;
    }
}

/* ------------------------------------------------------------------
   23. Account pages: layout, side menu
   ------------------------------------------------------------------ */

/* the side menu added "min-height: 100vh" to every account page, which left a
   big empty white area under short pages (Profile, Wishlist, Reviews) */
body:has(.account-content) .main-content-wrapper {
    min-height: 0 !important;
}

.account-content .sidebar .customer-sidebar .navigation li.active,
.account-content .sidebar .customer-sidebar .navigation li:hover {
    background-color: var(--ay-brand-tint);
    color: var(--ay-brand-deep);
}

.account-content .sidebar .customer-sidebar .navigation li.active a,
.account-content .sidebar .customer-sidebar .navigation li:hover a,
.account-content .sidebar .customer-sidebar .navigation li.active i,
.account-content .sidebar .customer-sidebar .navigation li:hover i {
    color: var(--ay-brand-deep);
}

.account-content .sidebar .customer-sidebar .account-details .customer-name {
    color: var(--ay-ink);
    font-weight: 700;
}

.account-content .account-layout .account-table-content input,
.account-content .account-layout .account-table-content select,
.account-content .account-layout .account-table-content textarea {
    border-radius: var(--ay-radius);
}

/* ------------------------------------------------------------------
   24. Profile: "Delete" is a destructive action, so it gets a quiet red
   outline instead of the main green button. It works exactly as before.
   ------------------------------------------------------------------ */
.account-content .profile-page-content > button.theme-btn {
    background: #fff !important;
    color: #8a1f1f !important;
    border: 1px solid #d9a0a0 !important;
}

.account-content .profile-page-content > button.theme-btn:hover,
.account-content .profile-page-content > button.theme-btn:focus {
    background: #fdeaea !important;
    color: #8a1f1f !important;
    border-color: #c97a7a !important;
}

/* ------------------------------------------------------------------
   25. Order detail: "Buy it again" in brand green (was bright yellow)
   ------------------------------------------------------------------ */
body .od-actions a.primary {
    background: var(--ay-brand);
    border-color: var(--ay-brand);
    color: var(--ay-ink);
    font-weight: 700;
}

body .od-actions a.primary:hover,
body .od-actions a.primary:focus {
    background: var(--ay-brand-hover);
    border-color: var(--ay-brand-hover);
    color: var(--ay-ink);
}

/* ==================================================================
   PHASE 6: homepage
   CSS only. The homepage sections are built from content saved in
   Velocity > Meta Data and from Vue carousels, so nothing here changes
   what is shown, only spacing, arrows and card alignment.
   ================================================================== */

/* ------------------------------------------------------------------
   26. Product carousels (Featured, New, and other homepage rows)
   ------------------------------------------------------------------ */

/* velocity.css pushes the first card 5px right, so it never lined up with the rest */
.VueCarousel .VueCarousel-slide:first-of-type .product-card-new {
    margin-left: 0;
}

/* each slide had its own shadow on top of the card; the card border is enough now */
.carousel-products .VueCarousel-slide {
    box-shadow: none;
}

/* arrows: white with a green ring and a dark glyph (was white glyph on green),
   larger tap size, tucked closer to the edge so they cover less of the first
   and last cards */
.VueCarousel-navigation-button.VueCarousel-navigation-prev,
.VueCarousel-navigation-button.VueCarousel-navigation-next {
    width: 44px !important;
    height: 44px !important;
    background-color: #fff !important;
    color: var(--ay-ink) !important;
    border: 2px solid var(--ay-brand) !important;
    box-shadow: 0 2px 8px rgba(31, 42, 16, .20);
}

.VueCarousel-navigation-button.VueCarousel-navigation-prev {
    left: 8px !important;
}

.VueCarousel-navigation-button.VueCarousel-navigation-next {
    right: 8px !important;
}

.VueCarousel-navigation-button.VueCarousel-navigation-prev:hover,
.VueCarousel-navigation-button.VueCarousel-navigation-next:hover,
.VueCarousel-navigation-button.VueCarousel-navigation-prev:focus,
.VueCarousel-navigation-button.VueCarousel-navigation-next:focus {
    background-color: var(--ay-brand) !important;
}

/* ------------------------------------------------------------------
   27. Promo banners (Moringa, Noni, charcoal soap, ...): breathing room
   ------------------------------------------------------------------ */
.advertisement-four-container,
.advertisement-three-container,
.advertisement-two-container {
    margin-top: 20px;
    margin-bottom: 20px;
}

.advertisement-four-container a:hover img,
.advertisement-three-container a:hover img {
    opacity: .94;
}

/* ------------------------------------------------------------------
   28. Space between homepage product sections
   ------------------------------------------------------------------ */
.container-fluid.featured-products,
.container-fluid.new-products {
    padding-top: 12px;
    padding-bottom: 16px;
}

@media (max-width: 768px) {
    .VueCarousel-navigation-button.VueCarousel-navigation-prev,
    .VueCarousel-navigation-button.VueCarousel-navigation-next {
        width: 40px !important;
        height: 40px !important;
    }
}