.citystar-products {
    box-sizing: border-box;
    margin: 56px auto;
    max-width: 100%;
    padding: 0 24px;
    position: relative;
    width: 100%;
}

.citystar-products__heading {
    align-items: center;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 26px;
}

.citystar-products__title {
    color: #071b4d;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.7px;
    line-height: 1.2;
    margin: 0;
}

.citystar-products__heading-actions {
    align-items: center;
    display: flex;
    gap: 18px;
}

.citystar-products__view-all {
    color: #e4002b;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.citystar-products__view-all:hover {
    color: #c80026;
    text-decoration: underline;
}

.citystar-products__navigation {
    display: flex;
    gap: 8px;
}

.citystar-products__arrow {
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    color: #071b4d;
    cursor: pointer;
    display: flex;
    font-size: 0;
    height: 42px;
    justify-content: center;
    padding: 0;
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        color 180ms ease,
        transform 180ms ease;
    width: 42px;
}

.citystar-products__arrow:hover,
.citystar-products__arrow:focus {
    background: #e4002b;
    border-color: #e4002b;
    color: #fff;
    transform: translateY(-1px);
}

.citystar-products__arrow::before {
    border-bottom: 2px solid currentColor;
    border-left: 2px solid currentColor;
    content: '';
    height: 8px;
    width: 8px;
}

.citystar-products__arrow--prev::before {
    transform: rotate(45deg);
}

.citystar-products__arrow--next::before {
    transform: rotate(225deg);
}

.citystar-products__viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    width: 100%;
}

.citystar-products__viewport::-webkit-scrollbar {
    display: none;
}

.citystar-products__track {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0 0 8px;
}

.citystar-product-card {
    flex: 0 0 calc((100% - 100px) / 6);
    min-width: 0;
    scroll-snap-align: start;
}

.citystar-product-card__inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.citystar-product-card__image-area {
    aspect-ratio: 1 / 1;
    background: #f3f4f6;
    border-radius: 18px;
    box-sizing: border-box;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden;
    position: relative;
    transition:
        box-shadow 180ms ease,
        transform 180ms ease;
}

.citystar-product-card:hover .citystar-product-card__image-area {
    box-shadow: 0 14px 32px rgba(7, 27, 77, 0.10);
    transform: translateY(-3px);
}

.citystar-product-card__image-link {
    display: block;
}

.citystar-product-card__image-area .product-image-container {
    display: block !important;
    height: 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}

.citystar-product-card__image-area .product-image-wrapper {
    display: block !important;
    height: 100% !important;
    padding: 0 !important;
    position: relative !important;
    width: 100% !important;
}

.citystar-product-card__image-area .product-image-photo {
    bottom: 0 !important;
    box-sizing: border-box;
    height: 100% !important;
    left: 0 !important;
    margin: auto !important;
    max-height: 100% !important;
    max-width: 100% !important;
    object-fit: contain;
    padding: 14px;
    position: absolute !important;
    right: 0 !important;
    top: 0 !important;
    width: 100% !important;
}

.citystar-product-card__badge {
    align-items: center;
    background: #e4002b;
    border-radius: 999px;
    color: #fff;
    display: flex;
    font-size: 12px;
    font-weight: 700;
    height: 34px;
    justify-content: center;
    left: 12px;
    min-width: 34px;
    padding: 0 9px;
    position: absolute;
    top: 12px;
    z-index: 2;
}

.citystar-product-card__details {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px 4px 2px;
}

.citystar-product-card__name {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px;
    min-height: 42px;
}

.citystar-product-card__name a {
    color: #121212;
    display: -webkit-box;
    overflow: hidden;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.citystar-product-card__name a:hover {
    color: #e4002b;
}

.citystar-product-card__rating {
    min-height: 20px;
}

.citystar-product-card__rating .product-reviews-summary {
    margin: 0;
}

.citystar-product-card__price {
    margin-top: 8px;
}

.citystar-product-card__price .price {
    color: #071b4d;
    font-size: 18px;
    font-weight: 700;
}

.citystar-product-card__price .old-price .price {
    color: #9ca3af;
    font-size: 13px;
    font-weight: 500;
}

.citystar-product-card__stock {
    font-size: 12px;
    font-weight: 600;
    margin: 7px 0 12px;
}

.citystar-product-card__stock .is-available {
    color: #27833b;
}

.citystar-product-card__stock .is-unavailable {
    color: #e4002b;
}

.citystar-product-card__actions {
    margin-top: auto;
}

.citystar-product-card__actions form {
    margin: 0;
}

.citystar-product-card__cart,
.citystar-product-card__details-link {
    align-items: center;
    border-radius: 10px;
    box-sizing: border-box;
    display: flex;
    font-size: 13px;
    font-weight: 700;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    text-align: center;
    text-decoration: none;
    width: 100%;
}

.citystar-product-card__cart.action.primary {
    background: #e4002b;
    border-color: #e4002b;
    color: #fff;
}

.citystar-product-card__cart.action.primary:hover {
    background: #c80026;
    border-color: #c80026;
}

.citystar-product-card__details-link {
    border: 1px solid #071b4d;
    color: #071b4d;
}

.citystar-products__empty {
    color: #6b7280;
    font-size: 15px;
    margin: 0;
    padding: 24px 0;
}

@media only screen and (max-width: 1439px) {
    .citystar-product-card {
        flex-basis: calc((100% - 80px) / 5);
    }
}

@media only screen and (max-width: 1100px) {
    .citystar-products {
        padding: 0 20px;
    }

    .citystar-product-card {
        flex-basis: calc((100% - 40px) / 3);
    }
}

@media only screen and (max-width: 767px) {
    .citystar-products {
        margin: 40px auto;
        padding: 0 16px;
    }

    .citystar-products__heading {
        align-items: flex-start;
        margin-bottom: 20px;
    }

    .citystar-products__title {
        font-size: 23px;
    }

    .citystar-products__heading-actions {
        gap: 10px;
    }

    .citystar-products__view-all {
        font-size: 12px;
    }

    .citystar-products__arrow {
        height: 36px;
        width: 36px;
    }

    .citystar-products__track {
        gap: 12px;
    }

    .citystar-product-card {
        flex-basis: calc((100% - 12px) / 2);
    }

    .citystar-product-card__image-area {
        border-radius: 14px;
    }

    .citystar-product-card__details {
        padding-top: 12px;
    }

    .citystar-product-card__name {
        font-size: 13px;
        min-height: 37px;
    }

    .citystar-product-card__price .price {
        font-size: 16px;
    }

    .citystar-product-card__cart,
    .citystar-product-card__details-link {
        font-size: 12px;
        min-height: 39px;
        padding: 8px;
    }
}
/* Product carousel sizing */
.citystar-product-carousel .product-item {
    min-width: 0;
}

.citystar-product-carousel .product-item-info {
    width: 100%;
}

.citystar-product-carousel .product-item-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 280px;
    padding: 16px;
    overflow: hidden;
    background: #f7f7f9;
    box-sizing: border-box;
}

.citystar-product-carousel .product-image-container {
    width: 100% !important;
    height: 100% !important;
}

.citystar-product-carousel .product-image-wrapper {
    height: 100%;
    padding-bottom: 0 !important;
}

.citystar-product-carousel .product-image-photo {
    position: static !important;
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 240px;
    margin: auto;
    object-fit: contain;
}

@media (max-width: 767px) {
    .citystar-product-carousel .product-item-photo {
        height: 210px;
        padding: 12px;
    }

    .citystar-product-carousel .product-image-photo {
        max-height: 180px;
    }
}


/* CITYSTAR PRODUCT QUANTITY CONTROL */

.citystar-product-card__actions form {
    align-items: stretch;
    display: grid;
    gap: 8px;
    grid-template-columns: 96px minmax(0, 1fr);
    margin: 0;
}

.citystar-product-card__qty {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 30px 1fr 30px;
    min-height: 42px;
    overflow: hidden;
}

.citystar-product-card__qty-button {
    align-items: center;
    background: transparent;
    border: 0;
    color: #071b4d;
    cursor: pointer;
    display: flex;
    font-size: 18px;
    font-weight: 700;
    height: 100%;
    justify-content: center;
    margin: 0;
    padding: 0;
}

.citystar-product-card__qty-button:hover,
.citystar-product-card__qty-button:focus {
    background: #f3f4f6;
    color: #e4002b;
}

.citystar-product-card__qty-input {
    appearance: textfield;
    background: transparent;
    border: 0;
    box-shadow: none;
    color: #071b4d;
    font-size: 14px;
    font-weight: 700;
    height: 100%;
    margin: 0;
    padding: 0;
    text-align: center;
    width: 100%;
}

.citystar-product-card__qty-input:focus {
    border: 0;
    box-shadow: none;
    outline: none;
}

.citystar-product-card__qty-input::-webkit-inner-spin-button,
.citystar-product-card__qty-input::-webkit-outer-spin-button {
    appearance: none;
    margin: 0;
}

.citystar-product-card__actions
.citystar-product-card__cart.action.tocart.primary {
    background: #071b4d !important;
    border-color: #071b4d !important;
    color: #ffffff !important;
    min-width: 0;
}

.citystar-product-card__actions
.citystar-product-card__cart.action.tocart.primary:hover,
.citystar-product-card__actions
.citystar-product-card__cart.action.tocart.primary:focus {
    background: #0a2768 !important;
    border-color: #0a2768 !important;
}

@media only screen and (max-width: 767px) {
    .citystar-product-card__actions form {
        gap: 6px;
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .citystar-product-card__qty {
        grid-template-columns: 26px 1fr 26px;
        min-height: 39px;
    }

    .citystar-product-card__qty-button {
        font-size: 16px;
    }
}


/* City Star compact plus cart button */
.citystar-product-card__cart.action.tocart.primary {
    align-items: center;
    display: inline-flex;
    justify-content: center;
}

.citystar-product-card__cart.action.tocart.primary::before {
    content: "+";
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.citystar-product-card__cart.action.tocart.primary > span {
    border: 0 !important;
    clip: rect(0, 0, 0, 0) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    white-space: nowrap !important;
    width: 1px !important;
}

/* Refined compact circular Add to Cart button */
.citystar-product-card__cart.action.tocart.primary {
    align-items: center !important;
    border-radius: 50% !important;
    display: inline-flex !important;
    flex: 0 0 48px !important;
    height: 48px !important;
    justify-content: center !important;
    min-height: 48px !important;
    min-width: 48px !important;
    padding: 0 !important;
    width: 48px !important;
}

.citystar-product-card__cart.action.tocart.primary::before {
    content: "+" !important;
    font-size: 27px !important;
    font-weight: 600 !important;
    line-height: 1 !important;
    margin: 0 !important;
}

.citystar-product-card__cart.action.tocart.primary > span {
    border: 0 !important;
    clip: rect(0, 0, 0, 0) !important;
    height: 1px !important;
    margin: -1px !important;
    overflow: hidden !important;
    padding: 0 !important;
    position: absolute !important;
    white-space: nowrap !important;
    width: 1px !important;
}

@media only screen and (max-width: 767px) {
    .citystar-product-card__cart.action.tocart.primary {
        flex-basis: 46px !important;
        height: 46px !important;
        min-height: 46px !important;
        min-width: 46px !important;
        width: 46px !important;
    }

    .citystar-product-card__cart.action.tocart.primary::before {
        font-size: 25px !important;
    }
}

/* =========================================
   Product card: qty on first row,
   Add to Cart button full-width below
   ========================================= */

.citystar-product-card__actions,
.citystar-product-actions,
.citystar-product-card .product-item-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    align-items: stretch !important;
}

/* qty box stays on first row */
.citystar-product-card__qty,
.citystar-product-card .qty-wrapper,
.citystar-product-card .field.qty {
    flex: 0 0 auto !important;
}

/* restore normal Add to Cart button */
.citystar-product-card__cart.action.tocart.primary {
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 100% !important;
    flex: 0 0 100% !important;
    min-height: 46px !important;
    height: 46px !important;
    padding: 0 16px !important;
    margin-top: 2px !important;
}

/* remove the custom + icon */
.citystar-product-card__cart.action.tocart.primary::before {
    content: none !important;
}

/* restore the real button text */
.citystar-product-card__cart.action.tocart.primary > span {
    border: 0 !important;
    clip: auto !important;
    height: auto !important;
    width: auto !important;
    margin: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    position: static !important;
    white-space: normal !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}

/* mobile fine-tuning */
@media only screen and (max-width: 767px) {
    .citystar-product-card__cart.action.tocart.primary {
        min-height: 44px !important;
        height: 44px !important;
        border-radius: 10px !important;
    }

    .citystar-product-card__cart.action.tocart.primary > span {
        font-size: 15px !important;
    }
}

/* Stack quantity and Add to Cart vertically */
.citystar-product-card form[data-role="tocart-form"] {
    align-items: stretch !important;
    display: grid !important;
    gap: 9px !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
}

/* Keep quantity selector compact */
.citystar-product-card form[data-role="tocart-form"]
.citystar-product-card__qty {
    justify-self: start !important;
    max-width: 96px !important;
    width: 96px !important;
}

/* Full rectangular button underneath */
.citystar-product-card form[data-role="tocart-form"]
.citystar-product-card__cart.action.tocart.primary {
    border-radius: 10px !important;
    box-sizing: border-box !important;
    display: flex !important;
    grid-column: 1 !important;
    height: 44px !important;
    justify-self: stretch !important;
    margin: 0 !important;
    min-height: 44px !important;
    min-width: 0 !important;
    width: 100% !important;
}

@media only screen and (max-width: 767px) {
    .citystar-product-card form[data-role="tocart-form"] {
        gap: 8px !important;
    }
}

/* Center quantity selector above Add to Cart */
.citystar-product-card form[data-role="tocart-form"]
.citystar-product-card__qty {
    justify-self: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Price and stock on the same line */
.citystar-product-card__price-stock {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    margin-top: 8px;
}

.citystar-product-card__price-stock
.citystar-product-card__price {
    margin: 0;
}

.citystar-product-card__price-stock
.citystar-product-card__stock {
    margin: 0;
}

/* Quantity selector same size as Add to Cart */
.citystar-product-card form[data-role="tocart-form"]
.citystar-product-card__qty {
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr) 44px !important;
    height: 44px !important;
    justify-self: stretch !important;
    margin: 0 !important;
    max-width: none !important;
    min-height: 44px !important;
    width: 100% !important;
}

.citystar-product-card form[data-role="tocart-form"]
.citystar-product-card__qty-button {
    box-sizing: border-box !important;
    height: 44px !important;
    width: 44px !important;
}

.citystar-product-card form[data-role="tocart-form"]
.citystar-product-card__qty-input {
    box-sizing: border-box !important;
    height: 44px !important;
    max-width: none !important;
    width: 100% !important;
}

/* Enlarge quantity number */
.citystar-product-card form[data-role="tocart-form"]
.citystar-product-card__qty-input {
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-align: center !important;
}
