/* Styling variables and resets */
:root {
    --color-brand: #f04f23;
    --color-brand-rgb: 240, 79, 35;
    --color-text-dark: #1f2937;
    --color-text-muted: #6b7280;
}

.product-page-wrapper {
    background-color: #fbfbfb;
    padding-bottom: 80px;
    min-height: 80vh;
}

.product-page-wrapper.no-banner {
    padding-top: 85px;
}

.product-page-wrapper.has-banner {
    padding-top: 50px;
}

@media (max-width: 768px) {
    .product-page-wrapper {
        padding-bottom: 40px;
    }

    .product-page-wrapper.no-banner {
        padding-top: 90px;
    }

    .product-page-wrapper.has-banner {
        padding-top: 48px;
    }
}

/* Category Hero */
.cat-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f3f4f6 100%);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
}

.cat-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-text-dark);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.cat-desc {
    color: var(--color-text-muted);
    font-size: 16px;
    line-height: 1.6;
}

/* Category Banner (Full-width) */
.cat-banner-fullwidth {
    width: 100%;
    height: 420px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    box-shadow: inset 0 -30px 40px -20px rgba(0, 0, 0, 0.1);
}

.cat-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.35));
}

.product-page-wrapper.has-banner .cat-hero {
    margin-top: -60px;
    position: relative;
    z-index: 10;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Responsive updates for Category Hero and Banner */
@media (max-width: 768px) {
    .cat-banner-fullwidth {
        height: 180px;
    }

    .cat-hero {
        padding: 24px 20px;
        margin-bottom: 24px;
        border-radius: 16px;
    }

    .product-page-wrapper.has-banner .cat-hero {
        margin-top: -40px;
    }

    .cat-title {
        font-size: 24px;
    }

    .cat-desc {
        font-size: 14px;
        line-height: 1.5;
    }
}

/* Toolbar Controls */
.product-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
    gap: 16px;
}

.product-count {
    color: var(--color-text-muted);
    font-size: 15px;
    font-weight: 500;
}

.product-count span {
    color: var(--color-brand);
    font-weight: 700;
}

.view-switcher {
    display: flex;
    gap: 8px;
}

.view-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background-color: white;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-btn:hover {
    border-color: var(--color-brand);
    color: var(--color-brand);
}

.view-btn.active-view {
    background-color: var(--color-brand);
    border-color: var(--color-brand);
    color: white !important;
    box-shadow: 0 4px 12px rgba(var(--color-brand-rgb), 0.25);
}

/* Grid & List Layout Structures */
#product-list-container.layout-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

@media (max-width: 1200px) {
    #product-list-container.layout-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    #product-list-container.layout-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    #product-list-container.layout-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

#product-list-container.layout-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Elegant Product Card Design */
.product-card {
    background-color: white;
    border: 1px solid #f3f4f6;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.06), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(var(--color-brand-rgb), 0.15);
}

.card-img-wrapper {
    overflow: hidden;
    position: relative;
    background-color: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.5s ease;
}

.product-card:hover .card-img-wrapper img {
    transform: scale(1.06);
}

.card-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-weight: 700;
    color: var(--color-text-dark);
    margin-bottom: 8px;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.product-card:hover .card-title {
    color: var(--color-brand);
}

.card-title a {
    color: inherit;
    text-decoration: none;
}

.card-desc {
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

.specs-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
    margin-bottom: 14px;
}

.spec-tag {
    background-color: #f3f4f6;
    color: #4b5563;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

.btn-detail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f4f6;
    color: var(--color-text-dark);
    font-weight: 700;
    font-size: 13px;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: auto;
    text-align: center;
}

.product-card:hover .btn-detail {
    background-color: var(--color-brand);
    color: white;
    box-shadow: 0 4px 10px rgba(var(--color-brand-rgb), 0.2);
}

/* GRID VIEW CARD STYLING */
#product-list-container.layout-grid .product-card {
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
}

#product-list-container.layout-grid .card-img-wrapper {
    aspect-ratio: 1 / 1;
    width: 100%;
}

#product-list-container.layout-grid .card-info {
    padding: 20px;
}

#product-list-container.layout-grid .card-title {
    font-size: 17px;
}

#product-list-container.layout-grid .card-desc {
    -webkit-line-clamp: 2;
}

/* LIST VIEW CARD STYLING */
#product-list-container.layout-list .product-card {
    display: flex;
    flex-direction: row;
    border-radius: 20px;
    overflow: hidden;
}

#product-list-container.layout-list .card-img-wrapper {
    width: 260px;
    height: 260px;
}

#product-list-container.layout-list .card-info {
    padding: 24px;
    justify-content: center;
}

#product-list-container.layout-list .card-title {
    font-size: 20px;
}

#product-list-container.layout-list .card-desc {
    -webkit-line-clamp: 3;
    margin-bottom: 12px;
}

#product-list-container.layout-list .btn-detail {
    align-self: flex-start;
    margin-top: 8px;
}

@media (max-width: 768px) {
    #product-list-container.layout-list .product-card {
        flex-direction: column;
    }

    #product-list-container.layout-list .card-img-wrapper {
        width: 100%;
        aspect-ratio: 1 / 1;
        height: auto;
    }

    #product-list-container.layout-list .card-info {
        padding: 20px;
    }

    #product-list-container.layout-list .btn-detail {
        align-self: stretch;
    }
}

/* Premium Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.pagination-list {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-list a,
.pagination-list span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background-color: white;
    border: 1px solid #e5e7eb;
    color: var(--color-text-dark);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-list a:hover {
    border-color: var(--color-brand);
    color: var(--color-brand);
}

.pagination-list .current {
    background-color: var(--color-brand);
    border-color: var(--color-brand);
    color: white;
    box-shadow: 0 4px 10px rgba(var(--color-brand-rgb), 0.2);
}

.pagination-list .disabled-link {
    opacity: 0.5;
    cursor: not-allowed;
}