/**
 * PrepHub Shop Page Styles
 *
 * @package PrepHub
 */

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

.shop-breadcrumbs {
    padding: 2rem 0 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(29, 29, 27, 0.6);
}

.breadcrumb--light {
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumb-item {
    color: inherit;
}

.breadcrumb-item a {
    color: inherit;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--color-bright-focus);
}

.breadcrumb--light .breadcrumb-item a:hover {
    color: var(--color-pure-clarity);
}

.breadcrumb-separator {
    opacity: 0.5;
}

/* ==========================================================================
   Shop Header
   ========================================================================== */

.shop-header {
    padding: 2rem 0 3rem;
    background: linear-gradient(180deg, rgba(132, 105, 171, 0.03) 0%, transparent 100%);
}

.shop-header__content {
    max-width: 700px;
}

.shop-header__title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-deep-knowledge);
}

.shop-header__description {
    font-size: 1.125rem;
    color: rgba(29, 29, 27, 0.7);
    line-height: 1.6;
}

/* ==========================================================================
   Shop Layout
   ========================================================================== */

.shop-content {
    padding: 3rem 0 5rem;
}

.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.shop-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.sidebar-widget {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(29, 29, 27, 0.08);
}

.sidebar-widget:last-of-type {
    border-bottom: none;
}

.sidebar-widget__title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-deep-knowledge);
}

/* Category List */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list__item {
    margin-bottom: 0.5rem;
}

.category-list__item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    font-size: 0.9375rem;
    color: rgba(29, 29, 27, 0.8);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.category-list__item a:hover {
    background: rgba(51, 84, 161, 0.05);
    color: var(--color-bright-focus);
}

.category-list__item.is-active a {
    background: var(--color-bright-focus);
    color: var(--color-pure-clarity);
    font-weight: 500;
}

.category-count {
    font-size: 0.8125rem;
    opacity: 0.6;
}

/* Filter Forms */
.filter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-checkbox,
.filter-radio {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.filter-checkbox input[type="checkbox"],
.filter-radio input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-checkbox__label,
.filter-radio__label {
    font-size: 0.9375rem;
    color: rgba(29, 29, 27, 0.8);
    cursor: pointer;
}

.apply-filters {
    margin-top: 1rem;
}

.btn--block {
    width: 100%;
}

/* ==========================================================================
   Shop Main Content
   ========================================================================== */

.shop-main {
    min-height: 400px;
}

/* Shop Toolbar */
.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(132, 105, 171, 0.03);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.shop-toolbar__count {
    font-size: 0.9375rem;
    color: rgba(29, 29, 27, 0.7);
    font-weight: 500;
}

.shop-toolbar__sorting select {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid rgba(29, 29, 27, 0.15);
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 0.9375rem;
    color: var(--color-deep-knowledge);
    background-color: var(--color-pure-clarity);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23201A42' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
    cursor: pointer;
    appearance: none;
}

/* Products Grid */
.products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Remove any WooCommerce pseudo-elements that might create empty grid cells */
.products::before,
.products::after {
    display: none !important;
    content: none !important;
}

/* Hide any non-product elements that WooCommerce might inject */
.products > *:not(.course-card):not(.product):not(li) {
    display: none !important;
}

/* Hide empty list items */
.products > li:empty {
    display: none !important;
}

/* Course Card */
.course-card {
    background: var(--color-pure-clarity);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(32, 26, 66, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(32, 26, 66, 0.12);
}

.course-card__image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.course-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-card__image img {
    transform: scale(1.05);
}

.course-card__placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-deep-knowledge) 0%, var(--color-bright-focus) 100%);
}

/* Course Card Badges */
.course-card__badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.375rem 0.875rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 1;
}

.course-card__badge--package {
    background: var(--color-bright-focus);
    color: var(--color-pure-clarity);
}

.course-card__badge--bootcamp {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: var(--color-pure-clarity);
}

.course-card__badge--rental {
    background: var(--color-mindflow);
    color: var(--color-pure-clarity);
}

.course-card__badge--oneoff {
    background: rgba(32, 26, 66, 0.8);
    color: var(--color-pure-clarity);
}

.course-card__badge--sale {
    top: auto;
    bottom: 1rem;
    left: 1rem;
    background: #FF6B6B;
    color: var(--color-pure-clarity);
}

/* Course Card Content */
.course-card__content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.course-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.course-card__location,
.course-card__schedule,
.course-card__age {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: rgba(29, 29, 27, 0.6);
}

.course-card__title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.course-card__title a {
    color: var(--color-deep-knowledge);
    transition: color 0.2s ease;
}

.course-card__title a:hover {
    color: var(--color-bright-focus);
}

.course-card__teacher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(29, 29, 27, 0.6);
    margin-bottom: 0.75rem;
}

.course-card__excerpt {
    font-size: 0.875rem;
    color: rgba(29, 29, 27, 0.7);
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

.course-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    border-top: 1px solid rgba(29, 29, 27, 0.08);
    margin-top: auto;
}

.course-card__price-wrapper {
    flex: 1;
}

.course-card__price-wrapper .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-deep-knowledge);
}

.course-card__price-wrapper del {
    font-size: 0.875rem;
    color: rgba(29, 29, 27, 0.4);
    margin-right: 0.5rem;
}

.course-card__price-wrapper ins {
    text-decoration: none;
}

.course-card__details {
    flex-shrink: 0;
}

/* Empty State */
.shop-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.shop-empty__icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    color: rgba(132, 105, 171, 0.3);
}

.shop-empty__title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-deep-knowledge);
}

.shop-empty__text {
    font-size: 1rem;
    color: rgba(29, 29, 27, 0.6);
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* ==========================================================================
   Single Product Page
   ========================================================================== */

/* Remove default site-main padding - product hero handles header offset */
.single-product-page {
    padding-top: 0 !important;
}

/* Product Hero */
.product-hero {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    background: var(--color-deep-knowledge);
    overflow: hidden;
    padding: 6rem 0 3rem;
}

.product-hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(32, 26, 66, 0.95) 0%,
        rgba(51, 84, 161, 0.90) 100%
    );
    z-index: 1;
}

.product-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
}

.product-hero .container {
    position: relative;
    z-index: 2;
}

.product-hero__breadcrumbs {
    margin-bottom: 2rem;
}

.product-hero__categories {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-mindflow);
    margin-bottom: 1rem;
}

.product-hero__title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-pure-clarity);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.product-hero__excerpt {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 2rem;
    max-width: 700px;
    line-height: 1.6;
}

.product-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.product-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Product Content Layout */
.product-content {
    padding: 4rem 0;
}

.product-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 4rem;
}

/* Product Main */
.product-main {
    max-width: 100%;
}

.product-description {
    margin-bottom: 3rem;
}

.product-description .section__title {
    margin-bottom: 1.5rem;
}

.product-description p {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: rgba(29, 29, 27, 0.8);
    margin-bottom: 1.25rem;
}

.product-description ul,
.product-description ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.product-description li {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: rgba(29, 29, 27, 0.8);
    margin-bottom: 0.5rem;
}

/* Teacher Profile */
.product-teacher {
    padding: 2.5rem;
    background: rgba(132, 105, 171, 0.03);
    border-radius: 20px;
}

.product-teacher .section__title {
    margin-bottom: 1.5rem;
}

.teacher-profile {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 2rem;
    align-items: start;
}

.teacher-profile__image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
}

.teacher-profile__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-profile__name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-deep-knowledge);
}

.teacher-profile__subjects {
    font-size: 1rem;
    color: var(--color-bright-focus);
    margin-bottom: 0.25rem;
}

.teacher-profile__experience {
    font-size: 0.9375rem;
    color: rgba(29, 29, 27, 0.6);
    margin-bottom: 1rem;
}

.teacher-profile__bio {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(29, 29, 27, 0.8);
    margin-bottom: 1.5rem;
}

.teacher-profile__qualifications {
    margin-bottom: 1.5rem;
}

.teacher-profile__qualifications h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-deep-knowledge);
}

.teacher-profile__qualifications p {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: rgba(29, 29, 27, 0.7);
}

/* Product Sidebar */
.product-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

/* Enrollment Card */
.enrollment-card {
    background: var(--color-pure-clarity);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(32, 26, 66, 0.12);
    margin-bottom: 2rem;
}

.enrollment-card__price {
    text-align: center;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(29, 29, 27, 0.08);
}

.enrollment-card__price .price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-deep-knowledge);
}

.enrollment-card__price del {
    display: block;
    font-size: 1.25rem;
    color: rgba(29, 29, 27, 0.4);
    margin-bottom: 0.5rem;
}

.enrollment-card__price ins {
    text-decoration: none;
}

/* Detail Items */
.enrollment-card__details {
    margin-bottom: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(29, 29, 27, 0.06);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item__label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(29, 29, 27, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-item__label svg {
    color: var(--color-bright-focus);
}

.detail-item__value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-deep-knowledge);
    padding-left: 1.75rem;
}

/* Enrollment Form */
.enrollment-card__form {
    margin-bottom: 1.5rem;
}

.enrollment-card__form .cart {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.enrollment-card__form .quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.enrollment-card__form .quantity input {
    width: 60px;
    padding: 0.5rem;
    border: 1px solid rgba(29, 29, 27, 0.15);
    border-radius: 8px;
    text-align: center;
    font-family: var(--font-primary);
    font-size: 1rem;
}

.enrollment-card__form .single_add_to_cart_button {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--color-bright-focus);
    color: var(--color-pure-clarity);
    border: none;
    border-radius: 8px;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.enrollment-card__form .single_add_to_cart_button:hover {
    background: var(--color-deep-knowledge);
}

/* Trust Badges */
.enrollment-card__trust {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(29, 29, 27, 0.7);
}

.trust-badge svg {
    color: #4CAF50;
}

/* Support Card */
.support-card {
    background: rgba(132, 105, 171, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
}

.support-card__title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-deep-knowledge);
}

.support-card__text {
    font-size: 0.875rem;
    color: rgba(29, 29, 27, 0.7);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.woocommerce-pagination {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(29, 29, 27, 0.08);
}

.woocommerce-pagination ul,
.page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0.75rem;
    margin: 0 auto;
    background: rgba(132, 105, 171, 0.04);
    border-radius: 100px;
    width: fit-content;
    border: none !important;
    box-shadow: none !important;
}

.page-numbers li {
    border: none !important;
    box-shadow: none !important;
}

ul.page-numbers {
    border: none !important;
    box-shadow: none !important;
}

.woocommerce-pagination li {
    display: inline-flex;
}

.woocommerce-pagination a,
.woocommerce-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-deep-knowledge);
    background: transparent;
    border: none;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.woocommerce-pagination a:hover {
    background: var(--color-pure-clarity);
    color: var(--color-bright-focus);
    transform: scale(1.1);
    box-shadow: none;
}

.woocommerce-pagination .current {
    background: linear-gradient(135deg, var(--color-mindflow) 0%, var(--color-bright-focus) 100%);
    color: var(--color-pure-clarity);
    box-shadow: none;
}

/* Prev/Next navigation links */
.woocommerce-pagination .prev,
.woocommerce-pagination .next {
    width: auto;
    padding: 0 1.25rem;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: var(--color-pure-clarity);
    box-shadow: none;
}

.woocommerce-pagination .prev:hover,
.woocommerce-pagination .next:hover {
    background: var(--color-deep-knowledge);
    color: var(--color-pure-clarity);
    transform: translateX(0) scale(1);
    box-shadow: 0 4px 15px rgba(32, 26, 66, 0.25);
}

.woocommerce-pagination .prev:hover {
    transform: translateX(-3px);
}

.woocommerce-pagination .next:hover {
    transform: translateX(3px);
}

/* Dots for skipped pages */
.woocommerce-pagination .dots {
    min-width: 32px;
    color: rgba(29, 29, 27, 0.4);
    font-weight: 400;
    letter-spacing: 0.1em;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1200px) {
    .shop-layout {
        grid-template-columns: 250px 1fr;
        gap: 2rem;
    }

    .product-layout {
        grid-template-columns: 1fr 350px;
        gap: 3rem;
    }
}

@media (max-width: 992px) {
    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-sidebar {
        position: static;
        order: 2;
        margin-top: 3rem;
    }

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

    .product-layout {
        grid-template-columns: 1fr;
    }

    .product-sidebar {
        position: static;
        max-width: 500px;
        margin: 0 auto;
    }

    .product-hero__title {
        font-size: 2.5rem;
    }

    .teacher-profile {
        grid-template-columns: 120px 1fr;
        gap: 1.5rem;
    }

    .teacher-profile__image {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 768px) {
    .shop-header__title {
        font-size: 2rem;
    }

    .shop-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .shop-toolbar__sorting {
        width: 100%;
    }

    .shop-toolbar__sorting select {
        width: 100%;
    }

    .products {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-hero {
        padding: 5rem 0 2rem;
    }

    .product-hero__title {
        font-size: 2rem;
    }

    .product-hero__excerpt {
        font-size: 1rem;
    }

    .product-hero__meta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .teacher-profile {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .teacher-profile__image {
        margin: 0 auto;
    }

    /* Pagination mobile */
    .woocommerce-pagination {
        margin-top: 3rem;
        padding-top: 2rem;
    }

    .woocommerce-pagination ul {
        padding: 0.5rem;
        gap: 0.25rem;
        flex-wrap: wrap;
    }

    .woocommerce-pagination a,
    .woocommerce-pagination span {
        width: 40px;
        height: 40px;
        font-size: 0.875rem;
    }

    .woocommerce-pagination .prev,
    .woocommerce-pagination .next {
        width: auto;
        padding: 0 1rem;
        font-size: 0.8125rem;
    }
}
