/*
 Theme Name:   Groceria Child
 Description:  Custom overrides for the Grocery Store.
 Author:       Felix Sihitshuwam
 Template:     groceria
 Version:      1.0.0
*/

/* Custom CSS for grocery categories goes here */

#cart-option-error-text, .error-text {
    color: red;
    font-size: 0.9rem;
}

.wc-block-components-product-details {
    display: block !important;
}

.wc-block-components-product-details > span {
    display: block !important;
    margin-bottom: 4px;
}

.wc-block-components-product-details > span > span:nth-child(3) {
    display: none !important;
}

.wc-block-components-product-details > span > span:nth-child(1) {
    font-weight: 800;
}

.wc-block-cart .wc-block-components-main tbody .wc-block-components-quantity-selector {
    padding-inline: 0;
}

.hero-cover-text-group {
    /* hide on small screens */
    display: none;
}

.hero-sm-text-group {
    /* Display on small screens */
    display: block;
}

@media (min-width: 768px) {
    .hero-cover-text-group {
        display: block;
    }

    .hero-sm-text-group {
        display: none;
    }
}

header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: var(--wp--preset--color--white);
}

.page-id-230 .wp-container-core-group-is-layout-2d3868fa > * + * {
    margin-block-start: 0;
}

/* Buttons */
.scroll-btn {
    background: white;
    border: 1px solid #ddd;
    cursor: pointer;
    padding: 1px 13px;
    font-size: 18px;
    border-radius: 20px;
}

/* Hide on large screens */
@media (min-width: 1024px) {
    .scroll-btn {
        display: none;
    }
}

.category-nav-wrapper {
    position: sticky;
    top: 55px;
    z-index: 998;
    display: flex;
    align-items: center;
    padding: 0 10px;
    margin-bottom: var(--wp--preset--spacing--6);
    background: var(--wp--preset--color--white);
}

.sticky-category-nav {
    display: flex;
    overflow-x: auto;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
    border-bottom: 1px solid #eee;
    padding: 5px 10px;
    margin: 0 5px;
    flex: 1;
    scroll-behavior: smooth;
}

.sticky-category-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.sticky-category-nav ul {
    display: flex;
    padding: 0;
    margin: 0;
    list-style: none;
}

.sticky-category-nav li {
    margin-right: 15px;
}

.sticky-category-nav a {
    text-decoration: none;
    color: #333;
    padding: 8px 0;
    white-space: nowrap;
    display: inline-block;
}

.sticky-category-nav a.active {
    font-weight: 600;
    border-bottom: 2px solid #000;
}

.restaurant-menu {
    width: 100%;
}

.restaurant-category-section {
    margin-bottom: 20px;
}

.groceria-section-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.restaurant-menu ul.products {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.restaurant-menu ul.products li.product {
    width: 100% !important;
    float: none !important;
}

.round-img {
    clip-path: circle(50% at 50% 50%);
}

.product-style .wp-block-woocommerce-product-price .wc-block-components-product-price {
    flex-direction: row;
}

.wc-block-components-product-price,
.taxonomy-product_cat,
.wp-block-post-title {
    padding: 0 16px;
}

@media (max-width: 760px) {
    .chicken-bucket-text-group {
        background-color: #ffffffb5;
        padding-left: 15px;
    }
}

@media (min-width: 1024px) {
    .chicken-bucket-text-group {
        margin-left: 3rem;
    }
}

#floating-cart-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff; /* Professional dark slate */
    color: var(--wp--preset--color--primary);
    padding: 14px 28px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80%;
    gap: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Visibility State */
#floating-cart-toast.cart-toast-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 40px); /* Slides down slightly when hidden */
}

.cart-toast-button {
    background: var(--wp--preset--color--secondary); /* High contrast orange for 'View Cart' */
    color: white !important;
    text-decoration: none;
    padding: 10px;
    border-radius: 25px;
}

.wp-block-woocommerce-product-summary {
    margin-left: 16px;
    margin-right: 16px;
}

.combo-groups-wrapper {
    margin: 0 16px;
}

.combo-group {
    margin-bottom: 15px;
    border-bottom: grey solid 1px;
}

.combo-group legend {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.combo-group legend .group-name {
    font-size: larger;
    font-weight: bolder;
}

.combo-group legend .required-side:not(:empty) {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 10px;
    background-color: #e4e0e0;
    border-radius: 0.5rem;
}

.side-option-option {
    display: flex;
    justify-content: space-between;
}

.side-option-option label {
    font-size: 0.9rem;
    font-weight: 500;
}

.custom-collection-main-div {
    background-color: #f6f2e7;
    padding: 20px 10px;
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center; /* centers horizontally */
    margin: 0 auto;
}

.line {
    flex: 1;
    height: 2px;
    background-color: #D09813;
}

.icon {
    margin: 0 15px; /* space between icon and lines */
}

.icon img {
    width: 40px;
    height: 40px;
    display: block;
}

.chpc-header {
    text-align: center;
}

.chpc-header > h1 {
    font-weight: 900;
    font-size: 2.5rem;
}

.chpc-header > h6 {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 2px;
}

/* Collection Layout */
.custom-product-collection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 20px 0;
}

/* Individual Card Styling */
.product-card, .product-style-kahl > li {
    background: #fff;
    border-radius: 12px;
    overflow: hidden; /* Ensures image respects border-radius at top */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); /* Raised shadow effect */
    transition: transform 0.3s ease;
}

.product-style-kahl.v3 .wp-block-woocommerce-product-button .wp-element-button,
.ymal .wp-element-button
{
    padding: 8px 15px;
    border-radius: 2rem;
    transition-property: all;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
    --tw-shadow: 0 0 #0000 !important;
    box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow) !important;
}

.product-style-kahl.v3 .wp-block-woocommerce-product-button .wp-element-button, .product-style.v3 .wp-block-woocommerce-product-button > span {
    grid-row-start: 1;
    grid-column-start: 1;
}

.product-style-kahl.v3 .wp-block-woocommerce-product-button .wp-element-button, .product-style.v3 .wp-block-woocommerce-product-button > span > a {
    /*text-indent: calc(var(--spacing)*-50);*/
    transition-property: transform, translate, scale, rotate;
    transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
    transition-duration: var(--tw-duration, var(--default-transition-duration));
    place-content: center;
    margin-left: auto;
    overflow: hidden;
    width: initial !important;
    /*height: 30px!important;*/

    font-size: 0.8rem;
    display: flex !important;
}

.product-style-kahl.v3 .wp-block-woocommerce-product-button .wp-element-button::before,
.ymal .wp-element-button::before
{
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    background-image: url('/wp-content/themes/mtheme/assets/icons8-plus-24.png');
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 6px;
}

.product-style-kahl.v3 .wp-element-button {
    font-size: 0; /* hides "Order Now" */
}

.wp-block-woocommerce-product-button > span {
    display: none;
}

.page-id-230 .entry-content {
    background-color: #f6f2e7;
}

.product-card:hover {
    transform: translateY(-5px); /* Lift further on hover */
}

/* Image - Full width, no margin */
.product-card-image img {
    width: 100%;
    height: auto;
    display: block;
}

.product-card-content {
    padding: 20px;
}

.product-category {
    font-size: 0.8125rem;
    color: #888;
}

.product-name a {
    text-decoration: none;
    color: #333;
    font-size: clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.093), 0.938rem);
    margin: 5px 0;
    display: block;
}

.faint-divider {
    border: 0;
    border-top: 1px solid rgba(146, 162, 182, 0.67);
    margin: 15px 0;
}

/* Footer - Flexbox Space Between */
.product-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-weight: bold;
    /*color: #2ecc71;*/
}

.add-to-cart-btn {
    background: #195bb1;
    color: #fff;
    padding: 8px 15px 8px 8px;
    border-radius: 2rem;
    text-decoration: none;
    font-size: 0.8rem;
    display: flex;
    column-gap: 5px;
    font-weight: 600;
}

.chpc-footer, .r1 {
    display: flex;
    align-items: center;
    justify-content: center; /* centers horizontally */
    margin: 20px auto;
}

.line-v2 {
    flex: 1;
    height: 2px;
    background-color: #195bb1;
}

.chpc-footer-text {
    text-decoration: underline;
    padding: 0 25px;
    text-underline-offset: 8px;
    font-weight: 800;
    display: flex;
    column-gap: 8px;
}

.custom-hero {
    background-image: url('/wp-content/themes/mtheme/assets/contact-us-hero.jpg');
    background-size: cover;
    background-position: center;
    padding: 40px 20px;
    position: relative;
}

.custom-hero .overlay {
    max-width: 600px;
    color: white;
    background-color: rgba(0, 0, 0, .55);
    padding: 20px;
    text-align: center;
}

.custom-hero .overlay > h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: normal;
}

.custom-hero .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    column-gap: 10px;
    border-radius: 0.5rem;
    color: #fff;
    padding: 12px 24px;
    text-decoration: none;
    cursor: pointer;
}

.btn.primary {
    background: #195bb1;
}

.btn.secondary {
    background: #ff6600;
}

.btn.outlined {
    border: thin solid #fff;
}

.r1 {
    width: 55%;
    margin: 5px auto;
}

.r1 > .line {
    background-color: #ff6600;
}

.r1 > h6 {
    color: #ff6600;;
    margin: 0 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.overlay .grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
}

.store-icon {
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.store-icon > .material-symbols-outlined {
    font-size: 1.7rem;
}

.circle {
    border-radius: 50%;
}

.box {
    border-radius: 10px;
    border: thin solid #195bb1;
    height: 40px;
}

.bg-grey {
    background-color: #195bb126;
}

.bg-white {
    background-color: white;
}

.bg-primary {
    background-color: #195bb1;
}

.primary-text {
    color: #195bb1;
}

.white-text {
    color: #fff
}

.sd-row {
    display: flex;
    justify-items: center;
    align-items: center;
    column-gap: 10px;
    margin-bottom: 15px;
}

.sd-row h1 {
    font-size: 1.5rem;
}
.sd-row .line-v2 {
    width: 100px;
    height: 5px;
}

.btn2 {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    column-gap: 10px;
    border-radius: 0.5rem;
    padding: 10px 15px;
    font-weight: 600;
    text-decoration: none;
}

.outlined-primary {
    border: medium solid #195bb1;
}

.buttons {
    display: flex;
    column-gap: 10px;
}

.buttons > a {
    flex: 1;
}

.material-symbols-outlined.filled {
    font-variation-settings: 'FILL' 1, /* 1 = filled, 0 = outline */ 'wght' 400,
    'GRAD' 0,
    'opsz' 24;
}

.category-header {
    display: flex;
    column-gap: 15px;
    border-bottom: thin solid #D09813;
    margin-bottom: 1rem;
    padding-bottom: 0.3rem;
}

.category-icon-wrapper {
    width: 50px;
    height: 50px;
    background-color: #195bb1;
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.category-icon {
    width: 24px;
}

.category-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    row-gap: 2px;
    line-height: 1;
}

.category-subtext {
    margin-block-start: 0;
    color: #505254a8;
}

@media (min-width: 768px) {
    .btn2{
        padding: 12px 24px;
    }
    .store-icon > .material-symbols-outlined {
        font-size: 2.3rem;
    }
    .store-icon {
        width: 70px;
        height: 70px;
    }
    .box {
        height: 60px;
    }
    .sd-row{
        column-gap: 20px;
    }
    .sd-row h1{
        font-size: 2rem;
    }
    .map-wrapper {
        border-left: 25px solid #195bb1;
    }

    .custom-product-collection {
        grid-template-columns: repeat(3, 1fr); /* 3 columns for md and lg */
    }
}

@media (max-width: 425px) {
}

@media (min-width: 760px) and (max-width: 1023px) {
    .divider {
        width: 35%;
    }

    .chpc-footer {
        width: 70%;
    }
}

@media (min-width: 1024px) {
    .divider {
        width: 35%;
    }

    .custom-product-collection {
        gap: 30px;
        padding: 20px 10%;
    }

    .chpc-footer {
        width: 80%;
    }

    .custom-hero .overlay {
        max-width: 50%;
        margin-left: 40px;
    }

    .overlay .grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 360px) {
    /* xs screens */
    .sd-row p {
        font-size: 0.9rem;
    }
}