/*=============== GOOGLE FONTS ===============*/
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200..1000&family=Fustat:wght@200..800&display=swap');

/*=============== VARIABLES CSS ===============*/
:root {
    --header-height: 60px;

    /*========== Colors ==========*/
    --first-color: hsl(120, 65%, 32%);
    --first-color-alt: hsl(120, 40%, 94%);
    --second-color: hsl(34, 94%, 87%);
    --title-color: hsl(0, 0%, 13%);
    --text-color: hsl(154, 13%, 32%);
    --text-color-light: hsl(60, 1%, 56%);
    --body-color: hsl(0, 0%, 100%);
    --container-color: hsl(0, 0%, 93%);
    --border-color: hsl(120, 36%, 85%);
    --border-color-alt: hsl(120, 65%, 32%);

    /*========== Font and typography ==========*/
    --body-font: "Fustat", sans-serif;
    --second-font: "Fustat", sans-serif;
    --big-font-size: 3.5rem;
    --h1-font-size: 2.75rem;
    --h2-font-size: 2rem;
    --h3-font-size: 1.75rem;
    --h4-font-size: 1.375rem;
    --large-font-size: 1.125rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.75rem;
    --tiny-font-size: 0.6875rem;

    /*========== Font weight ==========*/
    --weight-400: 400;
    --weight-500: 500;
    --weight-600: 600;
    --weight-700: 700;

    /*========== Transition ==========*/
    --transition: cubic-bezier(0, 0, 0.05, 1);
}

/* Responsive typography */
@media screen and (max-width: 1200px) {
    :root {
        --big-font-size: 3rem;
        --h1-font-size: 2.25rem;
        --h2-font-size: 1.75rem;
        --h3-font-size: 1.5rem;
        --h4-font-size: 1.25rem;
        --large-font-size: 1.0625rem;
        --normal-font-size: 0.9375rem;
        --small-font-size: 0.8125rem;
        --smaller-font-size: 0.6875rem;
        --tiny-font-size: 0.625rem;
    }
}

@media screen and (max-width: 768px) {
    :root {
        --big-font-size: 2.25rem;
        --h1-font-size: 1.875rem;
        --h2-font-size: 1.5rem;
        --h3-font-size: 1.25rem;
        --h4-font-size: 1.125rem;
        --large-font-size: 1rem;
        --normal-font-size: 0.9375rem;
        --small-font-size: 0.8125rem;
    }
}

/*=============== BASE ===============*/
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

input,
textarea,
body {
    color: var(--text-color);
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    font-weight: var(--weight-400);
}

body {
    background-color: var(--body-color);
}

h1,
h2,
h3,
h4 {
    font-family: var(--second-font);
    color: var(--title-color);
    font-weight: var(--weight-600);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
}

p {
    line-height: 1.5rem;
}

img {
    max-width: 100%;
}

button,
textarea,
input {
    background-color: transparent;
    border: none;
    outline: none;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
    max-width: 1320px;
    margin-inline: auto;
    padding-inline: .75rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

.section {
    padding-block: 2rem;
}

.section--lg {
    padding-block: 4rem;
}

.section__title {
    font-size: var(--h4-font-size);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section__title> :first-child {
    display: contents;
}

.section__title span {
    color: var(--first-color);
}

.form__input {
    border: 1px solid var(--border-color-alt);
    padding-inline: 1rem;
    height: 45px;
    font-size: var(--small-font-size);
    border-radius: 0.25rem;
}


.new__price {
    color: var(--first-color);
    font-weight: var(--weight-600);
}

.old__price {
    color: var(--text-color-light);
    text-decoration: line-through;
    font-size: var(--small-font-size);
}

/*=============== HEADER & NAV ===============*/
.header__top {
    background-color: var(--first-color-alt);
    border-bottom: 1px solid var(--first-color);
    padding-block: 0.875rem;
}

.header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header__contact span:first-child {
    margin-right: 2rem;
}

.header__contact span,
.header__alert-news,
.header__top-action {
    font-size: var(--small-font-size);
}

.header__alert-news {
    color: var(--text-color-light);
    font-weight: var(--weight-600);
}

.header__top-action {
    color: var(--text-color);
}

/*---------- Main Nav ----------*/
.nav {
    display: flex;
    align-items: center;
    gap: 0;
    padding-block: 0.85rem;
    position: relative;
}

.nav__logo-img {
    width: 100px;
    margin-inline-end: 6.5rem;
    flex-shrink: 0;
}

.nav__menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-left: 2.5rem;
    width: 100%;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex-shrink: 0;
}

.nav__link {
    color: var(--title-color);
    font-weight: var(--weight-700);
    transition: color 0.2s var(--transition);
}

.active-link,
.nav__link:hover {
    color: var(--first-color);
}


/* Search */
.header__search {
    margin-inline-start: auto;
    flex-shrink: 0;
    position: relative;
}

.header__search .form__input {
    width: 260px;
    height: 38px;
    border-radius: 2rem;
    padding: .45rem 2.8rem .45rem 1rem;
    transition: border-color .25s, box-shadow .25s, width .3s ease;
}

.header__search .form__input:focus {
    border-color: var(--first-color);
    box-shadow: 0 0 0 3px hsl(176, 88%, 27%, 0.12);
}

.search__btn {
    position: absolute;
    top: 50%;
    right: .65rem;
    left: auto;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, transform .15s;
    cursor: pointer;
}

.search__btn img {
    width: 15px;
    height: 15px;
    opacity: 0.45;
    transition: opacity .2s;
}

.search__btn:hover {
    background: hsl(176, 88%, 27%, .13);
    transform: translateY(-50%) scale(1.18);
}

.search__btn:hover img {
    opacity: 1;
}

/* User action icons — immediately after search bar inside nav__menu */
.header__user-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-inline-start: .5rem;
}

.header__action-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    transition: background .2s, transform .2s;
}

.header__action-btn img {
    width: 22px;
    height: 22px;
}

.header__action-btn:hover {
    background: hsl(176, 88%, 27%, 0.1);
    transform: scale(1.1);
}

.header__action-btn .count {
    position: absolute;
    top: 1px;
    right: 1px;
    background: var(--first-color);
    color: #fff;
    font-size: .58rem;
    font-weight: var(--weight-700);
    min-width: 17px;
    height: 17px;
    border-radius: 9999px;
    padding: 0 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid var(--body-color);
}

/* ── Mobile menu toggle (hidden on desktop) ── */
.nav__toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    margin-inline-start: auto;
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 4px;
    border-radius: 6px;
    transition: background .2s;
}

.nav__toggle:hover {
    background: hsl(176, 88%, 27%, 0.1);
}

.nav__toggle span {
    display: block;
    height: 2px;
    background: var(--title-color);
    border-radius: 2px;
    transition: transform .3s, opacity .3s, width .3s;
    width: 100%;
}

/* Hamburger → X animation when menu open */
.nav__toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav__toggle.open span:nth-child(2) {
    opacity: 0;
    width: 0;
}

.nav__toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/*=============== NAV DROPDOWN ===============*/
.nav__item {
    position: relative;
}

.nav__dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: var(--body-color);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    min-width: 180px;
    box-shadow: 0 8px 24px hsla(0, 0%, 0%, 0.08);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s var(--transition), transform 0.2s var(--transition), visibility 0.2s;
    padding: 0.5rem 0;
}

.nav__item:hover .nav__dropdown,
.nav__item:focus-within .nav__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav__dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.6rem 1.25rem;
    color: var(--text-color);
    font-size: var(--small-font-size);
    font-weight: var(--weight-500);
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.nav__dropdown-link:hover {
    background-color: var(--first-color-alt);
    color: var(--first-color);
}

.nav__dropdown-link i {
    font-size: 1rem;
    color: var(--first-color);
    flex-shrink: 0;
}

/* Dropdown arrow indicator on the link */
.nav__link--dropdown::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    margin-right: 0.4rem;
    vertical-align: middle;
    transition: transform 0.2s;
}

.nav__item:hover .nav__link--dropdown::after {
    transform: rotate(180deg);
}

/* Mobile: dropdown becomes a flat list inside the nav */
@media screen and (max-width: 992px) {
    .nav__dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
        display: none;
        background-color: var(--first-color-alt);
    }

    .nav__item.open .nav__dropdown {
        display: block;
    }

    .nav__dropdown-link {
        padding-right: 2rem;
        border-bottom: 1px solid var(--border-color);
    }

    .nav__link--dropdown::after {
        float: left;
        margin-left: 0;
        margin-right: 0;
    }
}

/*=============== BREAKPOINTS ===============*/

/* ── Large devices (≤ 1400px) ── */
@media screen and (max-width: 1400px) {
    .container {
        max-width: 1140px;
    }
}

/* ── Medium-large (≤ 1200px) ── */
@media screen and (max-width: 1200px) {
    .container {
        max-width: 960px;
    }

    .nav__logo-img {
        margin-inline-end: 3rem;
    }

    .nav__list {
        gap: 2rem;
    }

    .header__search .form__input {
        width: 200px;
    }
}

/* ── Tablet (≤ 992px) ── */
@media screen and (max-width: 992px) {
    .container {
        max-width: 720px;
    }

    /* Hide the alert text on tablet to save space */
    .header__alert-news {
        display: none;
    }

    /* Nav becomes two-row: logo + icons row / menu row */
    .nav {
        flex-wrap: wrap;
        row-gap: 0;
        padding-block: 0.65rem;
    }

    /* Logo stays on the right (RTL start) */
    .nav__logo {
        order: 1;
    }

    .nav__logo-img {
        margin-inline-end: 0;
        width: 90px;
    }

    /* Menu collapses below the logo row */
    .nav__menu {
        order: 4;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        margin-left: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height .35s ease, padding .3s ease;
        padding-block: 0;
    }

    .nav__menu.open {
        max-height: 600px;
        padding-block: .75rem;
    }

    .nav__list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%;
    }

    .nav__item {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    .nav__item:first-child {
        border-top: 1px solid var(--border-color);
    }

    .nav__link {
        display: block;
        padding: .65rem .25rem;
        width: 100%;
    }

    .header__search {
        margin-inline-start: 0;
        width: 100%;
        margin-top: .75rem;
    }

    .header__search .form__input {
        width: 100%;
    }

    /* Icons: order 2, no auto margin — sit right of the hamburger */
    .header__user-actions {
        order: 2;
        margin-inline-start: auto;
        margin-top: 0;
    }

    /* Hamburger: order 3, pushed to the far left (RTL end) */
    .nav__toggle {
        display: flex;
        order: 3;
        margin-inline-start: 0;
    }
}

/* ── Small tablet / large phone (≤ 768px) ── */
@media screen and (max-width: 768px) {
    .container {
        max-width: 100%;
        padding-inline: 1rem;
    }

    /* Collapse the top bar */
    .header__top {
        padding-block: 0.6rem;
    }

    .header__container {
        flex-wrap: wrap;
        gap: .4rem;
    }

    .header__contact span:first-child {
        margin-right: 1rem;
    }

    /* Stack contact vertically on very small */
    .header__contact {
        font-size: var(--tiny-font-size);
    }

    .header__top-action {
        font-size: var(--tiny-font-size);
    }
}

/* ── Phone (≤ 576px) ── */
@media screen and (max-width: 576px) {

    /* Hide address on phones, keep phone number */
    .header__contact span:first-child {
        display: none;
    }

    .header__contact span:first-child+span {
        margin-inline-start: 0;
    }

    .nav__logo-img {
        width: 80px;
    }

    .header__action-btn {
        width: 36px;
        height: 36px;
    }

    .header__action-btn img {
        width: 19px;
        height: 19px;
    }
}

/* ── Tiny phones (≤ 350px) ── */
@media screen and (max-width: 350px) {
    .header__contact {
        display: none;
    }

    .header__top-action {
        margin-inline-start: auto;
    }

    .nav__logo-img {
        width: 70px;
    }
}

/*=============== POINTS SHOP NAV LINK ===============*/
@media screen and (max-width: 1200px) {
    .nav__list {
        gap: 1.5rem;
    }
}

@media screen and (max-width: 992px) {
    .nav__list {
        gap: 0;
    }
}

/*=============== HOME ===============*/

.home__container {
    grid-template-columns: 5fr 7fr;
    align-items: center;
}

.home__subtitle,
.home__description {
    font-size: var(--large-font-size);
}

.home__subtitle {
    font-family: var(--second-color);
    font-weight: var(--weight-600);
    margin-bottom: 1rem;
    display: block;
}

.home__title {
    font-size: var(--h1-font-size);
    font-weight: var(--weight-700);
    line-height: 1.4;
}

.home__title span {
    color: var(--first-color);
    font-size: var(--big-font-size);
}

.home__description {
    margin-block: .5rem 2rem;
}

.home__img {
    justify-self: flex-end;
}

/* =============== Buttons ===============*/
.btn {
    display: inline-block;
    background-color: var(--first-color);
    border: 2px solid var(--first-color);
    color: var(--body-color);
    padding-inline: 1.75rem;
    height: 49px;
    line-height: 49px;
    border-radius: 0.25rem;
    font-family: var(--second-font);
    font-size: var(--small-font-size);
    font-weight: var(--weight-700);
    transition: all 0.4s var(--transition);
}

.btn:hover {
    background-color: transparent;
    color: var(--first-color);
}

.btn--md,
.btn--sm {
    font-family: var(--body-font);
}

.btn--md {
    height: 45px;
    line-height: 42px;
}

.btn--sm {
    height: 40px;
    line-height: 36px;
}

.flex {
    display: flex;
    align-items: center;
    column-gap: 0.5rem;
}

/*=============== CATEGORIES ===============*/
.categories {
    overflow: hidden;
}

.category__item {
    text-align: center;
    border: 1px solid var(--border-color);
    padding: 1.75rem 0.625rem 1.25rem;
    border-radius: 1.25rem;
    transition: all 0.25s var(--transition);
}

.category__item:hover {
    border-color: var(--first-color);
    background-color: var(--first-color-alt);
    box-shadow: 0 4px 16px hsla(176, 88%, 27%, 0.1);
}

.category__icon-box {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background-color: var(--first-color-alt);
    border: 1px solid var(--border-color);
    color: var(--first-color);
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-inline: auto;
    margin-bottom: 1.25rem;
    transition: all 0.25s var(--transition);
}

.category__item:hover .category__icon-box {
    background-color: var(--first-color);
    color: var(--body-color);
    border-color: var(--first-color);
}

.category__custom-img {
    width: 1.75rem;
    height: 1.75rem;
    object-fit: contain;
    transition: filter 0.25s var(--transition);
    filter: brightness(0) saturate(100%) invert(27%) sepia(51%) saturate(600%) hue-rotate(140deg) brightness(90%) drop-shadow(0 0 0.5px currentColor);
}

.category__item:hover .category__custom-img {
    filter: brightness(0) invert(1);
}

.category__img {
    border-radius: 0.75rem;
    margin-bottom: 1.25rem;
}

.category__title {
    color: var(--text-color);
    font-size: var(--small-font-size);
    font-weight: var(--weight-500);
    transition: color 0.25s var(--transition);
}

.category__item:hover .category__title {
    color: var(--first-color);
}

/* Swiper */
.swiper {
    overflow: initial;
}

.swiper-button-next::after,
.swiper-button-prev::after {
    content: '';
}

.swiper-button-next,
.swiper-button-prev {
    display: none;
}

/* Custom category arrows */
.categories__arrows {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.categories__arrow-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--first-color-alt);
    border: 1px solid var(--border-color);
    color: var(--first-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    transition: background-color 0.2s, color 0.2s;
    flex-shrink: 0;
}

.categories__arrow-btn:hover {
    background-color: var(--first-color);
    color: var(--body-color);
}

/*=============== PRODUCTS ===============*/
.tab__btns {
    display: flex;
    column-gap: 0.75rem;
    margin-bottom: 2rem;
}

.tab__btn {
    background-color: var(--container-color);
    color: var(--title-color);
    padding: 1rem 1.25rem 0.875rem;
    border-radius: .25rem;
    font-family: var(--second-font);
    font-size: var(--small-font-size);
    font-weight: var(--weight-600);
    cursor: pointer;
}

.products__container {
    grid-template-columns: repeat(4, 1fr);
}

.product__item {
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    transition: all 0.2s var(--transition);
}

.product__banner {
    padding: 0.625rem 0.75rem 0.75rem;
}

.product__banner,
.product__images {
    position: relative;
}


.product__images {
    display: block;
    overflow: hidden;
    border-radius: 1.25rem;
}

.product__img {
    vertical-align: middle;
    transition: all 1.5s var(--transition);
}

.product__item:hover .product__img {
    transform: scale(1.1);
}

.product__img.hover {
    position: absolute;
    top: 0;
    left: 0;

}

.product__actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    column-gap: 0.5rem;
    transition: all 0.2 var(--transition);
}

.action__btn {
    width: 40px;
    height: 40px;
    line-height: 42px;
    text-align: center;
    border-radius: 50%;
    background-color: var(--first-color-alt);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: var(--small-font-size);
    position: relative;
}

.action__btn::before,
.action__btn::after {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s cubic-bezier(0.71, 1.7, 0.77, 1.24);
}

.action__btn::before {
    content: '';
    top: -2px;
    border: 0.5rem solid transparent;
    border-top-color: var(--first-color);
}

.action__btn::after {
    content: attr(aria-label);
    bottom: 100%;
    background-color: var(--first-color);
    color: var(--body-color);
    font-size: var(--tiny-font-size);
    white-space: nowrap;
    padding-inline: 0.625rem;
    border-radius: 0.25rem;
    line-height: 2.58;
}

.product__badge {
    position: absolute;
    left: 1.25rem;
    top: 1.25rem;
    background-color: var(--first-color);
    color: var(--body-color);
    padding: 0.25rem 0.625rem;
    border-radius: 2.5rem;
    font-size: var(--tiny-font-size);
}

.product__badge.light-pink {
    background-color: hsl(341, 100%, 73%);
}

.product__badge.light-green {
    background-color: hsl(155, 20%, 67%);
}

.product__badge.light-orange {
    background-color: hsl(24, 100%, 73%);
}

.product__badge.light-blue {
    background-color: hsl(202, 53%, 76%);
}

.product__content {
    padding: 0 1.25rem 1.125rem;
}

.product__category {
    color: var(--text-color-light);
    font-size: var(--smaller-font-size);
}

.product__title {
    font-size: var(--normal-font-size);
    margin-block: .75rem 0.5rem;
}

.product__rating {
    color: hsl(42, 100%, 50%);
    font-size: var(--smaller-font-size);
    margin-bottom: .75rem;
}

.product__price .new__price {
    font-size: var(--large-font-size);
}

.cart__btn {
    position: static;
    margin-inline-start: auto;
    flex-shrink: 0;
}

.product__price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
}

/* Active tab */
.tab__btn.active-btn {
    color: var(--first-color);
    background-color: var(--second-color);
}

.tab__item:not(.active-tab) {
    display: none;
}

/* product hover */
.product__img.hover,
.product__actions,
.action__btn::before,
.action__btn::after,
.product__item:hover .product__img.default {
    opacity: 0;
}

.product__item:hover {
    box-shadow: 0 0 10px hsla(0, 0%, 0%, 0.1);
}


.product__item:hover .product__img.hover,
.product__item:hover .product__actions,
.action__btn:hover::before,
.action__btn:hover::after {
    opacity: 1;
}

.action__btn:hover::before,
.action__btn:hover::after {
    transform: translateX(-50%) translateY(-0.5rem);
}

.action__btn:hover {
    background-color: var(--first-color);
    border-color: var(--first-color);
    color: var(--body-color);
}

/*=============== DEALS ===============*/

.deals__container {
    grid-template-columns: repeat(2, 1fr);
}

.deals__item {
    position: relative;
    padding: 3rem;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    row-gap: 1.5rem;
}

.deals__item::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--deal-bg, url(../img/deals-1.jpg));
    background-size: cover;
    background-position: center;
    transform: scaleX(-1);
    z-index: 0;
    border-radius: inherit;
}

/* Push all direct children above the pseudo-element */
.deals__item>* {
    position: relative;
    z-index: 1;
}

.deals__brand {
    color: var(--first-color);
    font-size: var(--h3-font-size);
    margin-bottom: 0.25rem;
}

.deals__category {
    font-family: var(--second-font);
    font-size: var(--small-font-size);
}

.deals__title {
    max-width: 240px;
    font-size: var(--large-font-size);
    font-weight: var(--weight-400);
    line-height: 1.3;
}

.deals__price .new__price,
.deals__price .old__price {
    font-size: var(--large-font-size);
}

.deals__price .new__price {
    color: hsl(352, 100%, 60%);
}

.deals__countdown-text {
    margin-bottom: 0.25rem;
}

.countdown {
    display: flex;
    column-gap: 1.5rem;
}

.countdown__amount {
    position: relative;
}

.countdown__amount::after {
    content: ':';
    color: var(--title-color);
    font-size: var(--large-font-size);
    position: absolute;
    right: -25%;
    top: 20%;
}

.countdown__period {
    background-color: var(--first-color);
    color: var(--body-color);
    width: 60px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    border-radius: 0.25rem;
    font-size: var(--large-font-size);
    font-weight: var(--weight-600);
    margin-bottom: .5rem;
}

.unit {
    font-size: var(--small-font-size);
    text-align: center;
    display: block;
}

.deals__btn .btn {
    background-color: transparent;
    color: var(--first-color);
}

/* ── Large devices (≤ 1400px) ── */
@media screen and (max-width: 1400px) {
    .products__container {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ── Medium-large (≤ 1200px) ── */
@media screen and (max-width: 1200px) {
    .products__container {
        grid-template-columns: repeat(3, 1fr);
    }

    .deals__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Tablet (≤ 992px) ── */
@media screen and (max-width: 992px) {
    .products__container {
        grid-template-columns: repeat(2, 1fr);
    }

    .deals__container {
        grid-template-columns: 1fr;
    }

    .deals__item {
        padding: 2rem;
    }
}

/* ── Small tablet / large phone (≤ 768px) ── */
@media screen and (max-width: 768px) {
    .products__container {
        grid-template-columns: repeat(2, 1fr);
    }

    .countdown {
        column-gap: 1rem;
    }

    .countdown__period {
        width: 50px;
        height: 42px;
        line-height: 42px;
        font-size: var(--normal-font-size);
    }
}

/* ── Phone (≤ 576px) ── */
@media screen and (max-width: 576px) {
    .products__container {
        grid-template-columns: repeat(2, 1fr);
    }

    .deals__container {
        grid-template-columns: 1fr;
    }

    .deals__item {
        padding: 1.5rem;
    }

    .deals__title {
        max-width: 100%;
    }

    .countdown {
        column-gap: 0.75rem;
    }

    .countdown__period {
        width: 44px;
        height: 38px;
        line-height: 38px;
        font-size: var(--small-font-size);
    }
}

/* ── Tiny phones (≤ 400px) ── */
@media screen and (max-width: 400px) {
    .products__container {
        grid-template-columns: 1fr;
    }
}

/*=============== New Arrivals ===============*/

.new__arrivals {
    overflow: hidden;
}

/*================= showcase =================*/

.showcase__container {
    grid-template-columns: repeat(4, 1fr);
}

.showcase__wrapper .section__title {
    font-size: var(--normal-font-size);
    border-bottom: 1px solid var(--border-color-alt);
    padding-bottom: 0.75rem;
    margin-bottom: 2rem;
    position: relative;
}

.showcase__wrapper .section__title::before {
    content: '';
    position: absolute;
    right: 0;
    bottom: -1.3px;
    width: 50px;
    height: 2px;
    background-color: var(--first-color);
}

.showcase__item {
    display: flex;
    align-items: center;
    column-gap: 1.5rem;
    padding: 0.5rem 0.5rem 0.5rem 0.75rem;
    border-radius: 0.75rem;
    transition: background-color 0.25s var(--transition), transform 0.25s var(--transition);
    cursor: pointer;
}

.showcase__item:hover {
    background-color: var(--first-color-alt);
}

.showcase__item:not(:last-child) {
    margin-bottom: 1rem;
}

.showcase__img {
    width: 86px;
    border-radius: 0.5rem;
    transition: transform 0.25s var(--transition);
    flex-shrink: 0;
}

.showcase__item:hover .showcase__img {
    transform: scale(1.05);
}

.showcase__content {
    width: calc(100% - 110px);
}

.showcase__title {
    font-size: var(--small-font-size);
    font-weight: var(--weight-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: .5rem;
    transition: color 0.25s var(--transition);
}

.showcase__item:hover .showcase__title {
    color: var(--first-color);
}

/*=============== SHOWCASE RESPONSIVE ===============*/

/* ── Medium-large (≤ 1200px) ── */
@media screen and (max-width: 1200px) {
    .showcase__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Tablet (≤ 992px) ── */
@media screen and (max-width: 992px) {
    .showcase__container {
        grid-template-columns: repeat(2, 1fr);
    }

    .showcase__img {
        width: 75px;
    }
}

/* ── Small tablet / large phone (≤ 768px) ── */
@media screen and (max-width: 768px) {
    .showcase__container {
        grid-template-columns: repeat(2, 1fr);
    }

    .showcase__img {
        width: 68px;
    }

    .showcase__title {
        font-size: var(--smaller-font-size);
    }

    .showcase__item {
        column-gap: 1rem;
    }
}

/* ── Phone (≤ 576px) ── */
@media screen and (max-width: 576px) {
    .showcase__container {
        grid-template-columns: 1fr;
    }

    .showcase__img {
        width: 80px;
    }

    .showcase__title {
        font-size: var(--small-font-size);
        white-space: normal;
    }
}

/*=============== DIVIDER ===============*/
.divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-block: 2.5rem;
}

.divider__line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to left, transparent, var(--border-color-alt));
}

.divider__line:last-child {
    background: linear-gradient(to right, transparent, var(--border-color-alt));
}

.divider__icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border-color-alt);
    background-color: var(--first-color-alt);
    color: var(--first-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

/*=============== FOOTER ===============*/
.footer__container {
    grid-template-columns: 4.5fr repeat(2, 2fr) 3.5fr;
    padding-block: 2.5rem;
}

.footer__logo-img {
    width: 120px;
}

.footer__subtitle {
    color: var(--text-color-light);
    font-size: var(--small-font-size);
    margin-block: 1.25rem 0.625rem;
}

.footer__description {
    margin-bottom: 0.25rem;
}

.footer__description span {
    font-weight: var(--weight-600);
}

.footer__social .footer__subtitle {
    margin-top: 1.875rem
}

.footer__social-links {
    column-gap: 0.25rem;
}

.footer__social-icon {
    width: 20px;
    opacity: 0.7;
}

.footer__title {
    font-size: var(--large-font-size);
    margin-block: 1rem 1.25rem;
}

.footer__link {
    color: var(--title-color);
    font-size: var(--small-font-size);
    margin-bottom: 1rem;
    display: block;
    transition: all 0.3s var(--transition);
}

.footer__link:hover {
    color: var(--first-color);
    margin-left: 0.25rem;
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    padding-block: 1.25rem;
    border-top: 1px solid var(--border-color-alt);
}

.copyright,
.designer {
    color: var(--text-color-light);
    font-size: var(--small-font-size);
}

/*=============== RESPONSIVE FOOTER ===============*/

/* Tablet */
@media screen and (max-width: 992px) {
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 2rem;
    }
}

/* Phone */
@media screen and (max-width: 768px) {
    .footer__container {
        grid-template-columns: 1fr;
        row-gap: 1.5rem;
    }

    .footer__bottom {
        flex-direction: column;
        row-gap: 1rem;
        text-align: center;
    }

    .footer__logo-img {
        width: 100px;
    }

    .footer__title {
        margin-block: 0.75rem 1rem;
    }

    .footer__link {
        margin-bottom: 0.75rem;
    }

    .footer__subtitle {
        margin-block: 1rem 0.5rem;
    }
}

/* Tiny phones */
@media screen and (max-width: 400px) {
    .footer__container {
        padding-block: 1.5rem;
    }

    .footer__logo-img {
        width: 85px;
    }

    .footer__description,
    .footer__link {
        font-size: var(--smaller-font-size);
    }

    .footer__social-icon {
        width: 18px;
    }
}

/*=============== FILTER ===============*/
.filter {
    padding-block: 1rem 0;
}

.products.section--lg {
    padding-top: 1.25rem;
}

.filter__wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.625rem;
}

.filter__btn {
    background-color: var(--container-color);
    color: var(--title-color);
    padding: 0.625rem 1.25rem;
    border-radius: 2rem;
    font-family: var(--body-font);
    font-size: var(--small-font-size);
    font-weight: var(--weight-600);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.25s var(--transition);
}

.filter__btn:hover {
    background-color: var(--first-color-alt);
    border-color: var(--first-color);
    color: var(--first-color);
}

.filter__btn.active-filter {
    background-color: var(--first-color);
    border-color: var(--first-color);
    color: var(--body-color);
}

/*=============== Breadcrumbs ===============*/

.breadcrumb {
    background-color: var(--container-color);
    padding-block: 1.5rem;
}

.breadcrumb__list {
    column-gap: 0.75rem;
}

.breadcrumb__link {
    color: var(--text-color);
    font-size: var(--small-font-size);
}


/*=============== PAGINATION ===============*/
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2.5rem;
    padding-bottom: 0rem;
}

.pagination__item {
    list-style: none;
}

.pagination__link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--body-color);
    color: var(--title-color);
    font-size: var(--small-font-size);
    font-weight: var(--weight-600);
    transition: all 0.25s var(--transition);
}

.pagination__link:hover {
    background-color: var(--first-color-alt);
    border-color: var(--first-color);
    color: var(--first-color);
}

.pagination__link.active {
    background-color: var(--first-color);
    border-color: var(--first-color);
    color: var(--body-color);
}

.pagination__link.disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

.pagination__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-color-light);
    font-size: var(--small-font-size);
    font-weight: var(--weight-600);
}

.total__products {
    color: var(--text-color-light);
    font-size: var(--small-font-size);
    margin-bottom: 1.5rem;
}

.total__products span {
    color: var(--first-color);
    font-weight: var(--weight-700);
}

/*=============== DETAILS ===============*/
.details__container {
    grid-template-columns: 6.5fr 5.5fr;
    align-items: start;
    /* don't stretch columns to equal height */
    column-gap: 3rem;
}

.details__group:first-child {
    direction: rtl;
    text-align: right;
}

.details__group:last-child {
    padding-inline-start: 2.5rem;
}

.details__img {
    width: 100%;
    border-radius: 1rem;
    display: block;
    object-fit: cover;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.details__small-images {
    grid-template-columns: repeat(4, 1fr);
    /* up to 4 thumbs */
    gap: 0.625rem;
    margin-top: 0.625rem;
}

.details__small-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 0.5rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, opacity 0.2s ease;
}

.details__small-img:hover {
    border-color: var(--first-color);
    opacity: 0.85;
}

/* Active/selected thumbnail */
.details__small-img.active {
    border-color: var(--first-color);
}

.details__title {
    font-size: var(--h2-font-size);
}

.details__brand {
    font-size: var(--small-font-size);
    margin-block: 1rem;
}

.details__brand span {
    color: var(--first-color);
}

.details__price {
    border-top: 1px solid var(--border-color-alt);
    border-bottom: 1px solid var(--border-color-alt);
    padding-block: 1rem;
    column-gap: 1rem;
}

.details__price .new__price {
    font-size: var(--h2-font-size);
}

.details__price .old__price {
    font-size: var(--normal-font-size);
    font-weight: var(--weight-500);
}

.short__description {
    margin-block: 1rem 2rem;
}

.list__item,
.meta__list {
    font-size: var(--small-font-size);
    display: flex;
    /* ensure flex is set (the .flex class handles it,
                               but this makes it explicit) */
    align-items: center;
    column-gap: 0.5rem;
    /* ← this is the gap between the icon and the text */
    margin-bottom: 0.75rem;
}

/* Make the flaticon render at a visible, consistent size */
.list__item .fi {
    font-size: 1rem;
    /* icon size */
    flex-shrink: 0;
    color: var(--first-color);
    line-height: 1;
}

.details__color,
.details__size {
    column-gap: 0.75rem;
}

.details__color {
    margin-block: 2rem 1.5rem;
}

.details__size {
    margin-bottom: 2.5rem;
}

.details__color-title,
.details__size-title {
    font-size: var(--small-font-size);
    font-weight: var(--weight-600);
}

.color__list,
.size__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.color__link {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: block;
}

.color__link.color--active {
    outline: 2px solid var(--first-color);
    outline-offset: 3px;
}

.size__link {
    border: 1px solid var(--border-color-alt);
    padding: 0.375rem 0.75rem 0.5rem;
    color: var(--text-color);
    font-size: var(--small-font-size);
    border-radius: 0.25rem;
    /* ← adds a subtle radius — remove if you prefer sharp */
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
}

.size__link.size-active,
/* class applied by JS */
.size__link.size__active {
    /* legacy class name — keep both for safety  */
    background-color: var(--first-color);
    border-color: var(--first-color);
    color: var(--body-color);
}

.details__action {
    display: flex;
    column-gap: 0.375rem;
    margin-bottom: 3.25rem;
}

.quantity,
.details__action-btn {
    border: 1px solid var(--border-color-alt);
    font-size: var(--small-font-size);
}

.quantity {
    max-width: 80px;
    padding-block: 0.5rem;
    padding-inline: 1rem 0.5rem;
    border-radius: 0.25rem;
}

.details__action-btn {
    color: var(--text-color);
    line-height: 40px;
    padding-inline: 0.75rem;
}

.details__meta {
    border-top: 1px solid var(--border-color-alt);
    padding-top: 1rem;
}

/* Wishlist popup */
.wishlist__popup {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--body-color);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 8px 32px hsla(0, 0%, 0%, 0.12);
    z-index: 3000;
    transform: translateY(1rem);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    min-width: 260px;
}

.wishlist__popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wishlist__popup-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.wishlist__popup-icon--add {
    background: hsl(352, 100%, 95%);
    color: hsl(352, 100%, 55%);
}

.wishlist__popup-icon--remove {
    background: var(--first-color-alt);
    color: var(--first-color);
}

.wishlist__popup-text {
    font-size: var(--small-font-size);
    font-weight: var(--weight-600);
    color: var(--title-color);
    line-height: 1.3;
}

.wishlist__popup-sub {
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
    margin-top: 0.15rem;
}

/* Heart button active state — product cards */
.action__btn.wishlisted {
    color: hsl(352, 100%, 55%) !important;
    background-color: hsl(352, 100%, 97%) !important;
    border-color: hsl(352, 100%, 75%) !important;
}

/* Heart button active state — product detail page */
.details__action-btn.wishlisted {
    color: hsl(352, 100%, 55%);
    border-color: hsl(352, 100%, 55%);
    background: hsl(352, 100%, 97%);
}

/* Wishlist add pop animation */
@keyframes wishlist-pop {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.45); }
    65%  { transform: scale(0.88); }
    100% { transform: scale(1); }
}
.wishlist-pop {
    animation: wishlist-pop 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/*=============== DETAILS — Responsive ===============*/
@media screen and (max-width: 992px) {
    .details__container {
        grid-template-columns: 1fr;
        /* stack on tablet */
    }
}

@media screen and (max-width: 576px) {
    .details__small-images {
        grid-template-columns: repeat(3, 1fr);
    }
}

/*=============== REVIEWS ===============*/
.reviews {
    border-top: 1px solid var(--border-color);
    direction: rtl;
}

.reviews__header {
    align-items: flex-start;
    column-gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.reviews__title {
    font-size: var(--h3-font-size);
    flex-shrink: 0;
}

.reviews__summary {
    align-items: flex-start;
    column-gap: 2.5rem;
    flex-wrap: wrap;
}

.reviews__avg {
    text-align: center;
}

.reviews__avg-number {
    display: block;
    font-size: var(--h1-font-size);
    font-weight: var(--weight-700);
    color: var(--title-color);
    line-height: 1.1;
}

.reviews__avg .reviews__stars {
    color: hsl(42, 100%, 50%);
    font-size: var(--large-font-size);
    margin-block: 0.4rem;
}

.reviews__avg-count {
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
    white-space: nowrap;
}

.reviews__bars {
    display: flex;
    flex-direction: column;
    row-gap: 0.5rem;
    min-width: 220px;
}

.rating__bar {
    column-gap: 0.625rem;
}

.rating__label {
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
    width: 28px;
    flex-shrink: 0;
    text-align: right;
}

.rating__track {
    flex: 1;
    height: 8px;
    background-color: var(--container-color);
    border-radius: 2rem;
    overflow: hidden;
}

.rating__fill {
    height: 100%;
    background-color: hsl(42, 100%, 50%);
    border-radius: 2rem;
}

.rating__percent {
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
    width: 30px;
    text-align: left;
    flex-shrink: 0;
}

/* Review cards */
.reviews__list {
    display: flex;
    flex-direction: column;
    row-gap: 1.5rem;
    margin-bottom: 3rem;
}

.review__item {
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    transition: box-shadow 0.2s var(--transition);
}

.review__item:hover {
    box-shadow: 0 2px 12px hsla(0, 0%, 0%, 0.07);
}

.review__top {
    justify-content: flex-start;
    margin-bottom: 0.875rem;
    flex-wrap: wrap;
    column-gap: 0.75rem;
}

.review__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: var(--first-color-alt);
    border: 1px solid var(--border-color);
    color: var(--first-color);
    font-weight: var(--weight-700);
    font-size: var(--normal-font-size);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.review__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    row-gap: 0.15rem;
}

.review__name {
    font-weight: var(--weight-600);
    font-size: var(--small-font-size);
    color: var(--title-color);
}

.review__date {
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
}

.review__stars {
    color: hsl(42, 100%, 50%);
    font-size: var(--small-font-size);
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    gap: 2px;
}

.review__text {
    font-size: var(--small-font-size);
    line-height: 1.7;
}

/* Write a review form */
.review__form-wrapper {
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.75rem 2rem;
    background-color: var(--first-color-alt);
}

.review__form-title {
    font-size: var(--h4-font-size);
    margin-bottom: 1.25rem;
}

.review__form-stars {
    margin-bottom: 1rem;
    column-gap: 0.5rem;
}

.review__form-label {
    font-size: var(--small-font-size);
    font-weight: var(--weight-600);
}

.star__select {
    display: flex;
    column-gap: 0.25rem;
    direction: ltr;
}

.star__pick {
    font-size: 1.5rem;
    color: var(--border-color);
    cursor: pointer;
    transition: color 0.15s;
    line-height: 1;
}

.star__pick.active,
.star__pick:hover {
    color: hsl(42, 100%, 50%);
}

.review__input {
    width: 100%;
    margin-bottom: 0.875rem;
    background-color: var(--body-color);
}

.review__textarea {
    width: 100%;
    border: 1px solid var(--border-color-alt);
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    font-size: var(--small-font-size);
    font-family: var(--body-font);
    resize: vertical;
    min-height: 110px;
    margin-bottom: 1rem;
    background-color: var(--body-color);
    color: var(--text-color);
    display: block;
}

.review__submit {
    cursor: pointer;
}

/* Reviews responsive */
@media screen and (max-width: 768px) {
    .reviews__header {
        flex-direction: column;
        row-gap: 1.5rem;
    }

    .reviews__summary {
        flex-direction: column;
        row-gap: 1.25rem;
        width: 100%;
    }

    .reviews__bars {
        min-width: unset;
        width: 100%;
    }

    .review__form-wrapper {
        padding: 1.25rem 1rem;
    }
}

/*============== Cart ===============*/
.table__container {
    overflow-x: auto;
}


.table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    margin-bottom: 2rem;
}

.quantity {
    border: 1px solid var(--border-color-alt) !important;
    border-radius: 0.25rem;
    padding-block: 0.5rem;
    padding-inline: 1rem 0.5rem;
    max-width: 80px;
}

.table tr {
    border-top: 1px solid var(--border-color-alt);
}

.table tr:last-child {
    border-bottom: 1px solid var(--border-color-alt);
}

.table tr th:nth-child(1),
.table tr td:nth-child(1) {
    width: 216px;
}

.table tr th:nth-child(2),
.table tr td:nth-child(2) {
    width: 400px;
}

.table tr th:nth-child(3),
.table tr td:nth-child(3) {
    width: 108px;
}

.table tr th:nth-child(4),
.table tr td:nth-child(4) {
    width: 220px;
}

.table tr th:nth-child(5),
.table tr td:nth-child(5) {
    width: 200px;
}

.table tr th:nth-child(6),
.table tr td:nth-child(6) {
    width: 152px;
}

.table__img {
    width: 80px;
}

.table tr th,
.table tr td {
    padding: 0.5rem;
    text-align: center;
}

.table__title,
.table__description,
.table__price,
.table__subtotal,
.table__trash {
    font-size: var(--small-font-size);
}

.table__title {
    color: var(--first-color);
}

.table__description {
    max-width: 250px;
    margin-inline: auto;
}

.table__trash {
    color: var(--text-color-light);
}

.cart__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.cart__divider {
    width: 100%;
    height: 1px;
    background-color: var(--border-color);
    margin-block: 0.5rem;
}

/* Cart layout */
.cart {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.cart__group {
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

/* Shipping & Coupon panels */
.cart__shipping,
.cart__coupon {
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
}

.cart__coupon {
    margin-top: 1.5rem;
}

.cart__shipping .form.grid,
.cart__coupon .coupon__form.grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.cart__shipping .form__group.grid,
.cart__coupon .form__group.grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form__btn {
    display: flex;
    justify-content: flex-end;
}

/* Cart total panel */
.cart__total {
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
    align-self: start;
}

.cart__total-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.cart__total-table tr {
    border-top: 1px solid var(--border-color);
}

.cart__total-table tr:last-child {
    border-bottom: 1px solid var(--border-color);
}

.cart__total-table td {
    padding: 0.875rem 0.5rem;
    font-size: var(--small-font-size);
}

.cart__total-table tr:last-child .cart__total-title,
.cart__total-table tr:last-child .cart__total-price {
    font-weight: var(--weight-700);
    font-size: var(--normal-font-size);
    color: var(--title-color);
}

.cart__total-price {
    text-align: left;
    color: var(--first-color);
    font-weight: var(--weight-600);
}

.cart__total .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* Responsive */
@media screen and (max-width: 992px) {
    .cart__group {
        grid-template-columns: 1fr;
    }

    .cart__coupon {
        margin-top: 0;
    }
}

@media screen and (max-width: 576px) {

    .cart__shipping .form__group.grid,
    .cart__coupon .form__group.grid {
        grid-template-columns: 1fr;
    }

    .cart__actions {
        flex-direction: column;
    }

    .cart__actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/*=============== Login/Register ===============*/
.login-register__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: flex-start;
}

.login,
.register {
    border: 1px solid var(--border-color-alt);
    padding: 2rem;
}

/*=============== CHECKOUT ===============*/
.checkout__container {
    grid-template-columns: 7fr 5fr;
    /* تقسيم الصفحة لجزئين: البيانات والسلة */
    align-items: flex-start;
}

.checkout__group {
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: .75rem;
}

.checkout__title {
    font-size: var(--normal-font-size);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: .75rem;
    margin-block: 2rem 1.5rem;
}

.form__input.textarea {
    height: 150px;
    padding-block: 1rem;
    resize: none;
}

/*=============== ORDER TABLE ===============*/
.order__table {
    width: 100%;
    border-collapse: collapse;
}

.order__table th,
.order__table td {
    padding-block: 1rem;
    border-bottom: 1px solid var(--border-color);
    text-align: right;
}

.order__table th {
    font-size: var(--small-font-size);
    color: var(--title-color);
    font-weight: var(--weight-600);
}

.order__img {
    width: 60px;
    border-radius: .5rem;
}

.table__title {
    font-size: var(--small-font-size);
    font-weight: var(--weight-500);
}

.table__quantity {
    font-size: var(--smaller-font-size);
    color: var(--text-color-light);
}

.table__price {
    font-weight: var(--weight-600);
    color: var(--first-color);
}

.order__subtitle {
    font-size: var(--small-font-size);
    font-weight: var(--weight-600);
    color: var(--title-color);
}

.order__grand-total {
    font-size: var(--large-font-size);
    font-weight: var(--weight-700);
    color: var(--first-color);
}

/*=============== RESPONSIVE CHECKOUT ===============*/
@media screen and (max-width: 992px) {
    .checkout__container {
        grid-template-columns: 1fr;
    }
}

/* Tablet */
@media screen and (max-width: 768px) {
    .checkout__group {
        padding: 1.5rem;
    }

    .payment-options {
        gap: 10px;
    }

    .payment-card {
        padding: 12px;
    }

    .payment-card img {
        height: 28px;
    }

    .btn--checkout {
        height: 48px;
        line-height: 48px;
        font-size: var(--small-font-size);
    }

    .order__table th,
    .order__table td {
        padding-block: 0.75rem;
    }

    .order__img {
        width: 48px;
    }
}

/* Phone */
@media screen and (max-width: 576px) {
    .checkout__group {
        padding: 1rem;
        border-radius: 0.5rem;
    }

    .checkout__container {
        gap: 1rem;
    }

    /* Stack the order table image + title on small screens */
    .order__table td:first-child {
        width: 44px;
    }

    .order__img {
        width: 44px;
    }

    .order__table th,
    .order__table td {
        padding-block: 0.5rem;
        font-size: var(--smaller-font-size);
    }

    .order__grand-total {
        font-size: var(--normal-font-size);
    }

    .payment-card span {
        font-size: var(--small-font-size);
    }

    .btn--checkout {
        height: 44px;
        line-height: 44px;
    }

    /* Make form inputs slightly smaller */
    .checkout__group .form__input {
        height: 42px;
        font-size: var(--smaller-font-size);
    }

    .form__input.textarea {
        height: 120px;
    }
}

/* Tiny phones */
@media screen and (max-width: 400px) {
    .payment-card span {
        font-size: var(--tiny-font-size);
    }

    .payment-card .card-content {
        gap: 8px;
    }

    .payment-card img {
        height: 22px;
        flex-shrink: 0;
    }

    .payment-card {
        padding: 10px;
    }

    /* Shrink only the first payment card image (Visa/Master) */
    .payment-options .payment-card:first-child img {
        height: 18px;
    }
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.payment-card {
    border: 2px solid #f1f1f1;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: 0.3s;
    position: relative;
}

.payment-card input {
    position: absolute;
    opacity: 0;
}

.payment-card .card-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.payment-card img {
    height: 35px;
    width: auto;
}

.payment-card span {
    font-weight: bold;
    color: #333;
}

/* حالة الاختيار */
.payment-card:has(input:checked) {
    border-color: #d4af37;
    /* اللون الذهبي لـ كهرما */
    background-color: #fffdf5;
}

.btn--checkout {
    width: 100%;
    text-align: center;
    justify-content: center;
    margin-top: 1.5rem;
    height: 52px;
    line-height: 52px;
    font-size: var(--normal-font-size);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/*=========== Account Dashboard ===========*/
.accounts__container {
    grid-template-columns: 4fr 8fr;
}

.account__tabs {
    border: 1px solid var(--border-color-alt);
    border-radius: 0.25rem;
}

.account__tab {
    padding: 1rem 2rem;
    color: var(--title-color);
    font-size: var(--small-font-size);
    display: flex;
    align-items: center;
    column-gap: 0.625rem;
    cursor: pointer;
}

.account__tab--logout {
    font-family: var(--body-font);
    width: 100%;
    text-align: right;
    /* match RTL alignment of other tabs */
    cursor: pointer;
}

.account__tab--admin {
    display: flex;
    align-items: center;
    column-gap: 0.625rem;
    text-decoration: none;
}

.account__tab.active-tab {
    background-color: var(--first-color);
    color: var(--body-color);
}

.account__tab:not(:last-child) {
    border-bottom: 1px solid var(--border-color-alt);
}


.tab__content:not(.active-tab) {
    display: none;
}

.tab__content {
    border: 1px solid var(--border-color-alt);
}

.tab__header {
    background-color: var(--container-color);
    border: 1px solid var(--border-color-alt);
    padding: 1rem;
    font-size: var(--small-font-size);
}

.tab__body {
    padding: 1rem;
}

/* Full-width orders table */
.placed__order-table {
    width: 100%;
}

.placed__order-table tr th {
    color: var(--title-color);
    text-align: right;
}

.placed__order-table tr th,
.placed__order-table tr td {
    border: 1px solid var(--border-color-alt);
    padding: 0.5rem;
    font-size: var(--small-font-size);
}

.view__order,
.edit {
    color: var(--first-color);
}

.address {
    font-style: normal;
    font-size: var(--small-font-size);
    line-height: 1.5rem;
}

.city {
    margin-bottom: 0.25rem;
}

.edit {
    font-size: var(--small-font-size);
}

.tab__content:not(.active-tab) {
    display: none;
}

/*=============== RESPONSIVE LOGIN/REGISTER ===============*/
@media screen and (max-width: 768px) {
    .login-register__container {
        grid-template-columns: 1fr;
    }

    .login,
    .register {
        padding: 1.5rem;
    }
}

@media screen and (max-width: 576px) {

    .login,
    .register {
        padding: 1.25rem;
    }
}

/*=============== RESPONSIVE ACCOUNT DASHBOARD ===============*/
@media screen and (max-width: 992px) {
    .accounts__container {
        grid-template-columns: 1fr;
    }

    .account__tabs {
        display: flex;
        flex-wrap: wrap;
        border-radius: 0.5rem;
        overflow: hidden;
    }

    .account__tab {
        flex: 1 1 auto;
        justify-content: center;
        padding: 0.75rem 1rem;
        border-bottom: none !important;
        border-right: 1px solid var(--border-color-alt);
    }

    .account__tab:last-child {
        border-right: none;
    }
}

@media screen and (max-width: 576px) {
    .account__tabs {
        flex-direction: column;
    }

    .account__tab {
        border-right: none !important;
        border-bottom: 1px solid var(--border-color-alt) !important;
    }

    .account__tab:last-child {
        border-bottom: none !important;
    }

    .placed__order-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .tab__body {
        padding: 0.75rem;
    }
}

/*=============== RESPONSIVE CART & WISHLIST ===============*/

/* Tablet */
@media screen and (max-width: 768px) {
    .table__img {
        width: 60px;
    }

    .table tr th,
    .table tr td {
        padding: 0.4rem;
        font-size: var(--smaller-font-size);
    }

    .table__title {
        font-size: var(--smaller-font-size);
    }

    .title__description {
        display: none;
    }

    .quantity {
        max-width: 60px;
        padding-inline: 0.5rem 0.25rem;
    }

    /* Shrink the add to cart button in wishlist */
    .btn.btn--sm {
        padding-inline: 0.75rem;
        font-size: var(--tiny-font-size);
        height: 34px;
        line-height: 32px;
    }
}

/* Phone */
@media screen and (max-width: 576px) {
    .table__img {
        width: 48px;
    }

    /* Hide description column header on phones */
    .table tr th:nth-child(2),
    .table tr td:nth-child(2) {
        width: auto;
    }

    /* Hide stock column on phones (wishlist) */
    .wishlist .table tr th:nth-child(4),
    .wishlist .table tr td:nth-child(4) {
        display: none;
    }

    .cart__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .cart__actions .btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    /* Shrink add to cart button text */
    .wishlist .btn.btn--sm {
        font-size: 0;
        padding-inline: 0.6rem;
        width: 36px;
        height: 36px;
        line-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }

    /* Show only the icon */
    .wishlist .btn.btn--sm i {
        font-size: var(--small-font-size);
        margin: 0;
    }
}

/* Tiny phones */
@media screen and (max-width: 400px) {
    .table__img {
        width: 38px;
    }

    /* Hide image column on very tiny screens */
    .table tr th:nth-child(1),
    .table tr td:nth-child(1) {
        display: none;
    }

    .table tr th,
    .table tr td {
        padding: 0.3rem;
        font-size: var(--tiny-font-size);
    }

    .quantity {
        max-width: 50px;
        font-size: var(--tiny-font-size);
    }
}


/*=============== POINTS SHOP ===============*/

/* Hero */
.points-hero {
    background-color: var(--first-color-alt);
    border-bottom: 1px solid var(--border-color);
    padding-block: 2.5rem;
}

.points-hero__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2rem;
}

.points-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background-color: var(--second-color);
    border: 1px solid var(--border-color);
    color: var(--first-color);
    font-size: var(--smaller-font-size);
    font-weight: var(--weight-600);
    padding: .3rem .75rem;
    border-radius: 2rem;
    margin-bottom: 1rem;
}

.points-hero__title {
    font-size: var(--h2-font-size);
    font-weight: var(--weight-700);
    line-height: 1.4;
    margin-bottom: .75rem;
}

.points-hero__title span {
    color: var(--first-color);
}

.points-hero__desc {
    font-size: var(--normal-font-size);
    color: var(--text-color);
    margin-bottom: 1.75rem;
    max-width: 480px;
}

/* Steps row */
.points-hero__steps {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.points-step {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: var(--small-font-size);
    font-weight: var(--weight-600);
    color: var(--title-color);
}

.points-step__icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--first-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    flex-shrink: 0;
}

.points-step__arrow {
    color: var(--text-color-light);
    font-size: .7rem;
}

/* Points card */
.points-card {
    background-color: var(--body-color);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 1.75rem;
    min-width: 280px;
    box-shadow: 0 4px 20px hsla(120, 65%, 32%, .08);
}

.points-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: .5rem;
}

.points-card__label {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    font-weight: var(--weight-600);
}

.points-card__rate {
    display: flex;
    align-items: center;
    gap: .3rem;
    font-size: var(--tiny-font-size);
    color: var(--first-color);
    background-color: var(--first-color-alt);
    border: 1px solid var(--border-color);
    padding: .2rem .6rem;
    border-radius: 2rem;
}

.points-card__balance {
    display: flex;
    align-items: flex-end;
    gap: .4rem;
    margin-bottom: 1.25rem;
}

.points-card__number {
    font-size: var(--h1-font-size);
    font-weight: var(--weight-700);
    color: var(--first-color);
    line-height: 1;
}

.points-card__unit {
    font-size: var(--normal-font-size);
    color: var(--text-color-light);
    margin-bottom: .2rem;
}

.points-card__bar {
    height: 8px;
    background-color: var(--container-color);
    border-radius: 2rem;
    overflow: hidden;
    margin-bottom: .4rem;
}

.points-card__bar-fill {
    height: 100%;
    background-color: var(--first-color);
    border-radius: 2rem;
    transition: width .6s ease;
}

.points-card__bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: var(--tiny-font-size);
    color: var(--text-color-light);
    margin-bottom: 1.25rem;
}

.points-card__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    height: 40px;
    border: 1px solid var(--border-color-alt);
    border-radius: .5rem;
    color: var(--first-color);
    font-size: var(--small-font-size);
    font-weight: var(--weight-600);
    transition: background-color .2s, color .2s;
}

.points-card__btn:hover {
    background-color: var(--first-color);
    color: #fff;
}

/*=============== HOW IT WORKS INFO ===============*/
.points-info__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.points-info__item {
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 1.75rem 1.5rem;
    background-color: var(--body-color);
    transition: box-shadow .2s, border-color .2s;
}

.points-info__item:hover {
    border-color: var(--first-color);
    box-shadow: 0 4px 16px hsla(120, 65%, 32%, .08);
}

.points-info__icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.points-info__icon--earn {
    background-color: hsl(120, 40%, 94%);
    color: var(--first-color);
}

.points-info__icon--redeem {
    background-color: hsl(34, 94%, 93%);
    color: hsl(34, 94%, 45%);
}

.points-info__icon--expire {
    background-color: hsl(202, 53%, 90%);
    color: hsl(202, 53%, 40%);
}

.points-info__title {
    font-size: var(--normal-font-size);
    margin-bottom: .5rem;
}

.points-info__text {
    font-size: var(--small-font-size);
    line-height: 1.7;
    color: var(--text-color);
}

/*=============== POINTS BADGE & COST ===============*/
.points-badge {
    background-color: hsl(42, 100%, 50%) !important;
    color: hsl(42, 100%, 15%) !important;
    display: flex;
    align-items: center;
    gap: .25rem;
    font-weight: var(--weight-700);
}

.points-badge i {
    font-size: .6rem;
}

.points-cost {
    display: flex;
    align-items: center;
    gap: .3rem;
    color: hsl(42, 100%, 35%);
    font-weight: var(--weight-700);
    font-size: var(--normal-font-size);
}

.points-cost i {
    font-size: .75rem;
    color: hsl(42, 100%, 50%);
}

/* Highlight points products slightly */
.points-product__item {
    border-color: hsl(42, 100%, 85%);
}

.points-product__item:hover {
    border-color: hsl(42, 100%, 60%);
}

/*=============== REDEEM MODAL ===============*/
.points-modal__overlay {
    position: fixed;
    inset: 0;
    background-color: hsla(0, 0%, 0%, .5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
}

.points-modal__overlay.active {
    opacity: 1;
    visibility: visible;
}

.points-modal {
    background-color: var(--body-color);
    border-radius: 1.5rem;
    padding: 2rem;
    max-width: 400px;
    width: 100%;
    position: relative;
    transform: translateY(20px);
    transition: transform .25s;
    text-align: center;
}

.points-modal__overlay.active .points-modal {
    transform: translateY(0);
}

.points-modal__close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--container-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: .75rem;
    transition: background-color .2s;
}

.points-modal__close:hover {
    background-color: var(--border-color);
}

.points-modal__icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: hsl(42, 100%, 94%);
    color: hsl(42, 100%, 40%);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.points-modal__title {
    font-size: var(--h4-font-size);
    margin-bottom: .5rem;
}

.points-modal__product {
    color: var(--text-color-light);
    font-size: var(--small-font-size);
    margin-bottom: 1.5rem;
}

.points-modal__summary {
    background-color: var(--first-color-alt);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    text-align: right;
}

.points-modal__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-block: .4rem;
    font-size: var(--small-font-size);
}

.points-modal__val {
    font-weight: var(--weight-700);
    color: var(--title-color);
}

.points-modal__val--cost {
    color: hsl(352, 100%, 60%);
}

.points-modal__val--remaining {
    color: var(--first-color);
}

.points-modal__divider {
    height: 1px;
    background-color: var(--border-color);
    margin-block: .5rem;
}

.points-modal__actions {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.points-modal__confirm {
    width: 100%;
    text-align: center;
    justify-content: center;
    cursor: pointer;
}

.points-modal__cancel {
    color: var(--text-color-light);
    font-size: var(--small-font-size);
    cursor: pointer;
    transition: color .2s;
    background: none;
    border: none;
    padding: .25rem;
}

.points-modal__cancel:hover {
    color: var(--title-color);
}

/*=============== TOAST NOTIFICATION ===============*/
.points-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(1rem);
    background-color: var(--body-color);
    border: 1px solid var(--border-color);
    border-radius: 2rem;
    padding: .75rem 1.5rem;
    font-size: var(--small-font-size);
    font-weight: var(--weight-600);
    display: flex;
    align-items: center;
    gap: .5rem;
    box-shadow: 0 4px 20px hsla(0, 0%, 0%, .12);
    z-index: 2000;
    opacity: 0;
    transition: opacity .3s, transform .3s;
}

.points-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.points-toast--success {
    border-color: var(--first-color);
    color: var(--first-color);
}

.points-toast--error {
    border-color: hsl(352, 100%, 60%);
    color: hsl(352, 100%, 60%);
}

/*=============== RESPONSIVE POINTS SHOP ===============*/
@media screen and (max-width: 992px) {
    .points-hero__inner {
        grid-template-columns: 1fr;
    }

    .points-card {
        min-width: unset;
        width: 100%;
    }

    .points-info__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .points-info__grid {
        grid-template-columns: 1fr;
    }

    .points-hero__steps {
        gap: .75rem;
    }
}

@media screen and (max-width: 576px) {
    .points-hero {
        padding-block: 1.75rem;
    }

    .points-card {
        padding: 1.25rem;
    }

    .points-modal {
        padding: 1.5rem 1.25rem;
    }
}

/*=============== AUTH ===============*/
.auth__errors {
    background-color: hsl(352, 100%, 97%);
    border: 1px solid hsl(352, 100%, 85%);
    border-radius: .5rem;
    padding: .75rem 1rem;
    margin-bottom: 1rem;
}

.auth__error-item {
    color: hsl(352, 100%, 45%);
    font-size: var(--small-font-size);
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: .25rem;
}

.auth__error-item:last-child {
    margin-bottom: 0;
}

.auth__success {
    background-color: var(--first-color-alt);
    border: 1px solid var(--border-color);
    border-radius: .5rem;
    padding: .75rem 1rem;
    color: var(--first-color);
    font-size: var(--small-font-size);
    display: flex;
    align-items: center;
    gap: .4rem;
    margin-bottom: 1rem;
}

.input--error {
    border-color: hsl(352, 100%, 60%) !important;
}

.auth__divider {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-block: 1.25rem;
    color: var(--text-color-light);
    font-size: var(--small-font-size);
}

.auth__divider::before,
.auth__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--border-color);
}

.auth__social {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.auth__social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    height: 44px;
    border-radius: .5rem;
    border: 1px solid var(--border-color);
    font-size: var(--small-font-size);
    font-weight: var(--weight-600);
    color: var(--title-color);
    transition: background-color .2s, border-color .2s, box-shadow .2s;
    background-color: var(--body-color);
}

.auth__social-btn:hover {
    background-color: var(--container-color);
    box-shadow: 0 2px 8px hsla(0, 0%, 0%, .06);
}

.auth__social-btn--google:hover {
    border-color: hsl(4, 90%, 60%);
}

.auth__social-btn--facebook:hover {
    border-color: hsl(221, 44%, 41%);
}

.auth__remember {
    display: flex;
    align-items: center;
}

.auth__remember-label {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: var(--small-font-size);
    color: var(--text-color);
    cursor: pointer;
}

.auth__remember-label input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--first-color);
    cursor: pointer;
}

/*=============== AUTH CARD (verify / forgot / reset) ===============*/
.auth__card {
    max-width: 460px;
    margin-inline: auto;
    border: 1px solid var(--border-color);
    border-radius: 1.5rem;
    padding: 2.5rem 2rem;
    text-align: center;
}

.auth__card-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--first-color-alt);
    color: var(--first-color);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    border: 1px solid var(--border-color);
}

.auth__card-title {
    font-size: var(--h3-font-size);
    margin-bottom: .75rem;
}

.auth__card-text {
    color: var(--text-color);
    font-size: var(--small-font-size);
    line-height: 1.7;
    margin-bottom: 1.75rem;
}

.auth__card-link {
    color: var(--first-color);
    font-size: var(--small-font-size);
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    transition: opacity .2s;
}

.auth__card-link:hover {
    opacity: .75;
}

.auth__forgot-link {
    color: var(--first-color);
    font-size: var(--small-font-size);
    transition: opacity .2s;
    margin-right: auto;
}

.auth__forgot-link:hover {
    opacity: .75;
}

/*=============== AUTH REMEMBER ROW ===============*/
.auth__remember {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
}

/*=============== RESPONSIVE FIXES — ALL SCREENS ===============*/

/* ── Home hero section: stack at 992px ── */
@media screen and (max-width: 992px) {
    .home__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .home__img {
        max-width: 420px;
        margin-inline: auto;
        order: -1;
    }
}
@media screen and (max-width: 576px) {
    .home__img {
        max-width: 280px;
    }
}

/* ── Cart / Wishlist table: fix fixed column widths on tablet ── */
@media screen and (max-width: 768px) {
    .table tr th:nth-child(1),
    .table tr td:nth-child(1) { width: 80px; }

    .table tr th:nth-child(2),
    .table tr td:nth-child(2) { width: auto; }

    .table tr th:nth-child(3),
    .table tr td:nth-child(3) { width: 76px; }

    .table tr th:nth-child(4),
    .table tr td:nth-child(4) { width: 110px; }

    .table tr th:nth-child(5),
    .table tr td:nth-child(5) { width: 76px; }

    .table tr th:nth-child(6),
    .table tr td:nth-child(6) { width: 48px; }

    .table__img { width: 56px; }
}

@media screen and (max-width: 576px) {
    .table tr th:nth-child(1),
    .table tr td:nth-child(1) { width: 52px; }

    .table tr th:nth-child(3),
    .table tr td:nth-child(3) { width: 60px; }

    .table tr th:nth-child(4),
    .table tr td:nth-child(4) { width: 88px; }

    .table tr th:nth-child(5),
    .table tr td:nth-child(5) { width: 60px; }

    .table tr th:nth-child(6),
    .table tr td:nth-child(6) { width: 38px; }

    .table__img { width: 44px; }
}

/* ── Cart shipping inner grid: stack on phones ── */
@media screen and (max-width: 576px) {
    .cart__shipping .form__group.grid,
    .cart__coupon .form__group.grid {
        grid-template-columns: 1fr;
    }
}

/* ── Admin placed__order-table: add horizontal scroll at tablet ── */
@media screen and (max-width: 768px) {
    .admin-card .table__container,
    .placed__order-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    .placed__order-table td,
    .placed__order-table th {
        white-space: normal;
        min-width: 80px;
    }
}

/* ── Locations map: reduce height on small screens ── */
@media screen and (max-width: 768px) {
    #locations-map { height: 300px; }
    .locations__grid { grid-template-columns: 1fr 1fr; }
}
@media screen and (max-width: 480px) {
    #locations-map { height: 220px; }
    .locations__grid { grid-template-columns: 1fr; }
}

/* ── Section padding reduction on mobile ── */
@media screen and (max-width: 576px) {
    .section { padding-block: 1.5rem; }
}
@media screen and (max-width: 400px) {
    .section { padding-block: 1.25rem; }
}

/* ── Details page: reduce gallery on phone ── */
@media screen and (max-width: 480px) {
    .details__small-images {
        grid-template-columns: repeat(3, 1fr);
        gap: .4rem;
    }
    .details__img-wrapper {
        border-radius: .5rem;
    }
}

/* ── Admin card tables: min-width so columns don't collapse too hard ── */
@media screen and (max-width: 576px) {
    .admin-card { border-radius: .5rem; padding: .75rem; }
}

/* ── Checkout GPS box ── */
@media screen and (max-width: 576px) {
    #gpsStatusBox {
        flex-direction: column;
        align-items: stretch;
        gap: .5rem;
    }
    #gpsStatusBox button { width: 100%; }
}

/* ── General utility: prevent any element overflowing viewport ── */
img, video, iframe { max-width: 100%; }


/*=============== CART TABLE → CARD LAYOUT ON MOBILE ===============*/
@media screen and (max-width: 576px) {
    /* Hide the header row */
    .table thead { display: none; }

    /* Each row becomes a card */
    .table,
    .table tbody,
    .table tr {
        display: block;
        width: 100%;
    }

    .table tr {
        border: 1px solid var(--border-color-alt);
        border-radius: .6rem;
        margin-bottom: 1rem;
        padding: .5rem;
        background: var(--body-color);
        overflow: hidden;
    }

    .table tr:last-child { border-bottom: 1px solid var(--border-color-alt); }

    /* Image cell: full width, centered */
    .table tr td:nth-child(1) {
        display: flex;
        justify-content: center;
        width: 100% !important;
        padding: .5rem 0;
        border-bottom: 1px solid var(--border-color-alt);
    }

    .table tr td:nth-child(1) .table__img { width: 80px; }

    /* All other cells: label on right, value on left */
    .table tr td:not(:nth-child(1)) {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100% !important;
        padding: .45rem .6rem;
        font-size: var(--small-font-size);
        border-top: 1px solid var(--border-color-alt);
    }

    .table tr td:not(:nth-child(1))::before {
        content: attr(data-label);
        font-weight: var(--weight-600);
        color: var(--title-color);
        font-size: var(--smaller-font-size);
        flex-shrink: 0;
        margin-left: .5rem;
    }

    /* Quantity input: full row */
    .table td .quantity {
        max-width: 70px;
    }

    /* Trash button alignment */
    .table td[data-label="إزالة"] form { margin: 0; }
}

@media screen and (max-width: 400px) {
    .table tr td:nth-child(1) .table__img { width: 64px; }
}
