/* =========================================================
   WATERALL PRODUCTS PAGE
   File: public/assets/css/product.css
========================================================= */

/* =========================================================
   PRODUCTS HERO
========================================================= */

.products-page-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: 150px;
    padding: 20px max(6vw, 40px);

    overflow: hidden;

    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.96) 0%,
            rgba(255, 255, 255, 0.92) 38%,
            rgba(255, 255, 255, 0.55) 62%,
            rgba(255, 255, 255, 0.08) 100%
        ),
        url("/assets/img/product1.png");

    background-size: 100% auto;
    background-position: right center;
    background-repeat: no-repeat;

    border-bottom: 1px solid #dce8f2;
}

.products-page-hero::before {
    position: absolute;
    inset: 0;

    content: "";

    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.82) 0%,
            rgba(255, 255, 255, 0.55) 45%,
            rgba(255, 255, 255, 0.15) 100%
        );

    pointer-events: none;
}

.products-page-hero__content {
    position: relative;
    z-index: 2;

    max-width: 680px;
}

.products-page-hero__eyebrow {
    display: inline-block;

    margin-bottom: 10px;

    color: #d19d2a;

    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.products-page-hero h1 {
    margin: 0 0 12px;

    color: #071a33;

    font-size: clamp(35px, 4vw, 52px);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -1.2px;
}

.products-page-hero p {
    max-width: 650px;
    margin: 0;

    color: #536273;

    font-size: 17px;
    line-height: 1.65;
}

.products-page-hero__visual {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 145px;

    width: 145px;
    height: 145px;
}

.products-page-hero__circle {
    position: absolute;
    inset: 0;

    border: 1px solid rgba(14, 165, 233, 0.18);
    border-radius: 50%;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.92),
            rgba(14, 165, 233, 0.12)
        );

    box-shadow: 0 16px 38px rgba(7, 26, 51, 0.09);
}

.products-page-hero__icon {
    position: relative;
    z-index: 2;

    color: #0ea5e9;

    font-size: 48px;

    filter: drop-shadow(
        0 8px 15px rgba(14, 165, 233, 0.20)
    );
}

/* Mobile filter button is hidden on desktop */
.wa-mobile-filter-btn,
.wa-mobile-filter-btn--hero {
    display: none;
}

/* =========================================================
   PAGE WRAPPER
========================================================= */

.wa-products-page,
.wa-products-page * {
    box-sizing: border-box;
}

.wa-products-page {
    max-width: 1360px;
    margin: 0 auto 10px;
}

.wa-products-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;

    gap: 15px;
    margin-bottom: 20px;
}

/* =========================================================
   ADMIN CREATE BUTTON
========================================================= */

.wa-create-product-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    margin-left: auto;
    padding: 0 17px;

    color: #ffffff;
    background: #16824b;

    border-radius: 8px;

    font-weight: 750;
    text-decoration: none;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.wa-create-product-btn:hover {
    color: #ffffff;
    background: #126d40;

    transform: translateY(-1px);
}

/* =========================================================
   PRODUCTS LAYOUT
========================================================= */

.wa-products-layout {
    display: grid;
    grid-template-columns: 275px minmax(0, 1fr);
    align-items: start;

    gap: 22px;
}

/* =========================================================
   FILTER PANEL
========================================================= */

.wa-filter-panel {
    width: 275px;
    margin-top: 30px;
    padding: 21px;

    background: #ffffff;

    border: 1px solid #dce7f0;
    border-radius: 16px;

    box-shadow: 0 10px 28px rgba(7, 26, 51, 0.07);
}

.wa-filter-group {
    margin-bottom: 21px;
}

.wa-filter-group:last-child {
    margin-bottom: 0;
}

.wa-filter-heading {
    display: block;

    margin-bottom: 8px;

    color: #1f2937;

    font-size: 14px;
    font-weight: 750;
}

/* =========================================================
   SEARCH
========================================================= */

.wa-search {
    position: relative;
}

.wa-search input {
    width: 100%;
    height: 46px;
    padding: 0 50px 0 15px;

    color: #1f2937;
    background: #ffffff;

    border: 1px solid #d6e1eb;
    border-radius: 11px;

    font-size: 14px;

    box-shadow: 0 5px 16px rgba(7, 26, 51, 0.07);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.wa-search input::placeholder {
    color: #94a3b8;
}

.wa-search button {
    position: absolute;
    top: 5px;
    right: 5px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;
    padding: 0;

    background: transparent;

    border: 0;
    border-radius: 8px;

    cursor: pointer;

    transition: background 0.2s ease;
}

.wa-search button:hover {
    background: #eaf7ff;
}

.wa-search svg {
    width: 23px;
    height: 23px;
}

/* =========================================================
   FILTER INPUTS
========================================================= */

.wa-search input:focus,
.wa-filter-panel select:focus,
.wa-price-input:focus {
    outline: none;

    border-color: #0ea5e9;

    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.11);
}

.wa-filter-panel select {
    width: 100%;
    min-height: 42px;
    padding: 8px 11px;

    color: #1f2937;
    background: #ffffff;

    border: 1px solid #cfdce8;
    border-radius: 8px;
}

.wa-filter-option {
    display: flex;
    align-items: flex-start;

    gap: 7px;
    margin-bottom: 7px;

    color: #1f2937;

    font-size: 14px;
    line-height: 1.4;

    cursor: pointer;
}

.wa-filter-option input {
    flex: 0 0 auto;

    width: 16px;
    height: 16px;
    margin-top: 2px;

    accent-color: #0ea5e9;
}

.wa-price-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;

    gap: 7px;
}

.wa-price-input {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 8px 10px;

    border: 1px solid #cfdce8;
    border-radius: 8px;
}

.wa-apply-filters {
    width: 100%;
    min-height: 44px;
    padding: 10px 15px;

    color: #ffffff;
    background: #075985;

    border: 0;
    border-radius: 8px;

    font-size: 14px;
    font-weight: 750;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.wa-apply-filters:hover {
    background: #0369a1;

    transform: translateY(-1px);
}

/* =========================================================
   PRODUCTS GRID
========================================================= */

.wa-products-wrap {
    min-width: 0;
}

.wa-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 22px;
}

/* =========================================================
   PRODUCT CARD
========================================================= */

.wa-card {
    position: relative;

    display: flex;
    flex-direction: column;

    min-width: 0;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #dce7f0;
    border-radius: 16px;

    box-shadow: 0 10px 28px rgba(7, 26, 51, 0.07);

    transition:
        transform 0.28s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}

.wa-card:hover {
    border-color: #b8d6e9;

    box-shadow: 0 20px 45px rgba(10, 40, 80, 0.12);

    transform: translateY(-8px);
}

.wa-card--disabled {
    opacity: 0.55;
}

.wa-card--disabled:hover {
    transform: none;
}

/* =========================================================
   PRODUCT IMAGE
========================================================= */

.wa-card__media {
    position: relative;

    display: block;

    height: 205px;
    padding: 12px;

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            #fafcff,
            #f3f9ff
        );

    text-decoration: none;
}

.wa-card__image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
    object-position: center;

    border-radius: 10px;

    transition: transform 0.35s ease;
}

.wa-card:hover .wa-card__image {
    transform: scale(1.035);
}

/* =========================================================
   PRODUCT BADGES
========================================================= */

.wa-badge {
    position: absolute;
    top: 13px;
    left: 13px;
    z-index: 3;

    padding: 5px 9px;

    color: #ffffff;

    border-radius: 999px;

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.wa-badge--pending {
    background: #d97706;
}

.wa-badge--sold {
    background: #dc2626;
}

.wa-badge--sale {
    right: 13px;
    left: auto;

    background: #e11d48;
}

/* =========================================================
   PRODUCT CARD CONTENT
========================================================= */

.wa-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;

    padding: 14px;
}

.wa-card__rating {
    display: flex;
    align-items: center;

    min-height: 20px;
    gap: 7px;
    margin-bottom: 5px;
}

.wa-card__stars {
    color: #f59e0b;

    font-size: 13px;
    letter-spacing: 1px;
}

.wa-card__rating-number {
    color: #64748b;

    font-size: 12px;
    font-weight: 700;
}

.wa-card__new {
    color: #0284c7;

    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.wa-card__title {
    margin: 0 0 5px;

    color: #071a33;

    font-size: 22px;
    font-weight: 750;
    line-height: 1.2;
}

.wa-card__title a {
    color: inherit;

    text-decoration: none;
}

.wa-card__title a:hover {
    color: #0284c7;
}

.wa-card__description {
    min-height: 34px;
    margin: 0 0 8px;

    color: #64748b;

    font-size: 13px;
    line-height: 1.5;
}

.wa-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;
    margin-bottom: 14px;

    color: #94a3b8;

    font-size: 12px;
}

.wa-card__meta a {
    color: #0284c7;

    font-weight: 750;
    text-decoration: none;
}

.wa-card__meta a:hover {
    color: #0369a1;
}

/* =========================================================
   PRODUCT PRICE
========================================================= */

.wa-card__price {
    display: flex;
    align-items: baseline;

    gap: 8px;
    margin-top: auto;
    margin-bottom: 10px;
}

.wa-card__price strong {
    color: #047c75;

    font-size: 22px;
    font-weight: 850;
}

.wa-card__old-price {
    color: #94a3b8;

    font-size: 13px;
    text-decoration: line-through;
}

/* =========================================================
   PRODUCT ACTIONS
========================================================= */

.wa-card__actions {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;

    gap: 9px;
}

.wa-card__actions form {
    width: 100%;
    margin: 0;
}

.wa-buy,
.wa-cart {
    width: 100%;
    min-height: 41px;
    padding: 8px 9px;

    border-radius: 8px;

    font-size: 13px;
    font-weight: 800;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.wa-buy {
    color: #075985;
    background: #ffffff;

    border: 1px solid #0ea5e9;
}

.wa-buy:hover {
    background: #eff9ff;

    transform: translateY(-1px);
}

.wa-cart {
    color: #ffffff;
    background: #075985;

    border: 1px solid #075985;
}

.wa-cart:hover {
    background: #0369a1;

    box-shadow: 0 8px 18px rgba(7, 89, 133, 0.18);

    transform: translateY(-1px);
}

/* =========================================================
   ADMIN ACTIONS
========================================================= */

.wa-admin-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 5px;
    margin-top: 12px;
    padding-top: 12px;

    border-top: 1px solid #e5edf4;
}

.wa-admin-actions button,
.wa-admin-actions a {
    margin: 0;
    padding: 5px 8px;

    color: #ffffff;

    border: 0;
    border-radius: 5px;

    font-size: 10px;
    font-weight: 700;
    text-decoration: none;

    cursor: pointer;
}

.wa-admin-sold {
    color: #111827 !important;
    background: #eab308;
}

.wa-admin-edit {
    background: #64748b;
}

.wa-admin-archive {
    background: #dc2626;
}

.wa-admin-status {
    background: #7e22ce;
}

.wa-admin-sale {
    background: #0284c7;
}

.wa-admin-remove-sale {
    background: #475569;
}

/* =========================================================
   MODALS
========================================================= */

.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.50);
}

.modal-content {
    width: 90%;
    max-width: 400px;
    padding: 20px;

    background: #ffffff;

    border-radius: 10px;

    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

/* =========================================================
   LARGE TABLET
========================================================= */

@media (max-width: 1100px) {
    .wa-products-page {
        max-width: 1120px;
    }

    .wa-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 820px) and (min-width: 769px) {
    .wa-products-layout {
        grid-template-columns: 235px minmax(0, 1fr);
    }

    .wa-filter-panel {
        width: 235px;
    }
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 768px) {
    .products-page-hero {
        position: relative;

        display: block;

        min-height: auto;
        padding: 32px 20px 82px;

        background-size: cover;
        background-position: right center;
    }

    .products-page-hero__visual {
        display: none;
    }

    .products-page-hero h1 {
        font-size: 32px;
        line-height: 1.08;
    }

    .products-page-hero p {
        max-width: 95%;

        font-size: 15px;
        line-height: 1.65;
    }

    /* Floating filter button inside hero */
    .wa-mobile-filter-btn--hero {
        position: absolute;
        right: 18px;
        bottom: 18px;
        z-index: 20;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        width: auto;
        min-width: 104px;
        height: 44px;
        gap: 8px;
        padding: 0 16px;

        color: #ffffff;
        background:
            linear-gradient(
                135deg,
                #071f3b,
                #075985
            );

        border: 1px solid rgba(255, 255, 255, 0.28);
        border-radius: 999px;

        box-shadow:
            0 10px 24px rgba(7, 31, 59, 0.22),
            inset 0 1px 0 rgba(255, 255, 255, 0.16);

        font-size: 13px;
        font-weight: 800;

        cursor: pointer;

        transition:
            background 0.25s ease,
            transform 0.25s ease,
            box-shadow 0.25s ease;
    }

    .wa-mobile-filter-btn--hero i {
        font-size: 13px;
    }

    .wa-mobile-filter-btn--hero:hover,
    .wa-mobile-filter-btn--hero:focus-visible {
        color: #ffffff;

        background:
            linear-gradient(
                135deg,
                #075985,
                #0ea5e9
            );

        box-shadow: 0 14px 28px rgba(7, 89, 133, 0.28);

        transform: translateY(-2px);
    }

    .wa-products-page {
        padding: 20px 14px 40px;
    }

    .wa-products-toolbar {
        margin-bottom: 0;
    }

    .wa-products-layout {
        display: block;
    }

    .wa-filter-panel {
        display: none;

        width: 100%;
        margin-top: 0;
        margin-bottom: 18px;
    }

    .wa-filter-panel.open {
        display: block;
    }

    .wa-product-grid {
        grid-template-columns: 1fr;

        gap: 15px;
    }

    .wa-card__media {
        height: 230px;
    }

    .wa-card:hover {
        transform: none;
    }
}

/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {
    .products-page-hero {
        padding: 28px 16px 76px;
    }

    .products-page-hero__eyebrow {
        margin-bottom: 8px;

        font-size: 11px;
        letter-spacing: 1.6px;
    }

    .products-page-hero h1 {
        font-size: 29px;
        letter-spacing: -0.8px;
    }

    .products-page-hero p {
        max-width: 100%;

        font-size: 14px;
    }

    .wa-mobile-filter-btn--hero {
        right: 15px;
        bottom: 15px;

        min-width: 100px;
        height: 42px;
        padding: 0 15px;
    }

    .wa-products-page {
        padding-right: 12px;
        padding-left: 12px;
    }

    .wa-card__media {
        height: 220px;
    }

    .wa-card__actions {
        grid-template-columns: 0.8fr 1.2fr;
    }
}