/* Edwiser Store - Product View Page Styles */

/*
 * The declarations below intentionally use `!important` to override styles
 * coming from the active Moodle theme (Boost, RemUI, Classic and downstream
 * forks) and from Bootstrap utility classes. The plugin's host page selectors
 * (`#page-local-edwiserstore-*`, `.path-local-edwiserstore`) already provide
 * high specificity, but theme stylesheets load after this file and frequently
 * target the same shells, so `!important` is the documented escape hatch.
 */
/* stylelint-disable declaration-no-important */

/* Product detail page, tabs, reviews, accordion */

.local-edwiserstore-product-view-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
    background-color: #f5f7fa;
}

/* Top Wrapper: Header Container and Sidebar Container Side by Side */
.path-local-edwiserstore .product-view-top-wrapper {
    display: flex;
    flex-direction: row;
    gap: 24px;
    margin-bottom: 24px;
    align-items: flex-start;
}

/* Product Header Container */
.path-local-edwiserstore .product-view-header-container {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    flex: 1;
    min-width: 0;
}

/* Product Header */
.path-local-edwiserstore .product-view-header {
    margin-bottom: 24px;
}

.path-local-edwiserstore .product-view-title {
    font-size: 2.5em;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    line-height: 1.3;
}

.path-local-edwiserstore .product-view-bundle-badge {
    font-size: 12px;
}

.path-local-edwiserstore .product-view-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    align-items: flex-start;
}

.path-local-edwiserstore .product-view-header-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    flex: 0 1 auto;
}

.path-local-edwiserstore .product-view-header-item:last-child {
    flex: 1 1 auto;
}

.path-local-edwiserstore .product-view-header-label {
    font-size: 0.9em;
    color: #555;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.path-local-edwiserstore .product-view-header-value {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9em;
    color: #555;
    font-weight: 400;
    flex-wrap: wrap;
    word-break: break-word;
}

.path-local-edwiserstore .product-view-instructor-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.path-local-edwiserstore .product-view-instructor-names {
    color: #555;
    font-weight: 400;
}

.path-local-edwiserstore .product-view-instructor-names .instructor-count {
    color: var(--edw-primary);
    font-weight: 600;
    margin-left: 4px;
}

.path-local-edwiserstore .product-view-star-icon {
    color: #ffd700;
    font-size: 16px;
    margin-right: 4px;
}

/* Main Content Wrapper - Full Width Below Top Section */
.path-local-edwiserstore .product-view-main-content-wrapper {
    width: 100%;
    margin-bottom: 48px;
}

/* Content Container (Tabs + Content) */
.path-local-edwiserstore .product-view-content-container {
    background: #fff;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    min-height: 200px;
    display: block;
    width: 100%;
}

.path-local-edwiserstore .product-view-sidebar {
    width: 340px;
    flex-shrink: 0;
}

/* Sidebar Container */
.path-local-edwiserstore .product-view-sidebar-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: fit-content;
    width: 340px;
    flex-shrink: 0;
}

/* Product Media Section */
.path-local-edwiserstore .product-view-media-section {
    margin-top: 0;
}

.path-local-edwiserstore .product-view-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    margin-bottom: 0;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.path-local-edwiserstore .product-view-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video iframe for external sources (YouTube, Vimeo, Dailymotion, VideoPress) */
.path-local-edwiserstore .product-view-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

/* Play button overlay for self-hosted videos only (not iframes) */
.path-local-edwiserstore .product-view-video-wrapper:not(.playing):has(.product-view-video)::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: var(--edw-primary);
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--edw-primary) 40%, transparent);
    cursor: pointer;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.path-local-edwiserstore .product-view-video-wrapper:not(.playing):has(
.product-view-video):hover::before {
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--edw-primary) 50%, transparent);
}

.path-local-edwiserstore .product-view-video-wrapper:not(.playing):has(.product-view-video)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-left: 20px solid #fff;
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    margin-left: 4px;
    z-index: 11;
    pointer-events: none;
}

.path-local-edwiserstore .product-view-video-wrapper.playing::before,
.path-local-edwiserstore .product-view-video-wrapper.playing::after {
    display: none;
}

/* Hide play button overlay when iframe is present */
.path-local-edwiserstore .product-view-video-wrapper:has(.product-view-video-iframe)::before,
.path-local-edwiserstore .product-view-video-wrapper:has(.product-view-video-iframe)::after {
    display: none;
}

.path-local-edwiserstore .product-view-image-wrapper,
.path-local-edwiserstore .product-view-image-wrapper-no-video {
    width: 100%;
    margin-bottom: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.path-local-edwiserstore .product-view-image {
    width: 100%;
    height: auto;
    display: block;
}

.path-local-edwiserstore .product-view-secondary-image-wrapper {
    width: 100%;
    margin-top: 24px;
    border-radius: 8px;
    overflow: hidden;
}

.path-local-edwiserstore .product-view-secondary-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Tabs Navigation */
.path-local-edwiserstore .product-view-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 0;
    background: #fff;
    padding: 0 24px;
}

.path-local-edwiserstore .product-view-tab {
    padding: 16px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #6c757d;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.path-local-edwiserstore .product-view-tab:hover {
    color: var(--edw-primary);
    background: #f5f8ff;
}

.path-local-edwiserstore .product-view-tab.active {
    color: var(--edw-primary);
    border-bottom-color: var(--edw-primary);
    background: transparent;
}

/* Tab Content */
.path-local-edwiserstore .product-view-tab-content {
    min-height: 400px;
    padding: 24px;
    background: #fff;
}

.path-local-edwiserstore .product-view-tab-panel {
    display: none;
}

.path-local-edwiserstore .product-view-tab-panel.active {
    display: block;
}

/* Description Section */
.path-local-edwiserstore .product-view-description-content {
    line-height: 1.8;
}

.path-local-edwiserstore .product-view-section-title {
    font-size: 24px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 24px;
}

.path-local-edwiserstore .product-view-subsection-title {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin-top: 32px;
    margin-bottom: 16px;
}

.path-local-edwiserstore .product-view-description-text {
    font-size: 16px;
    color: #374151;
    line-height: 1.8;
    margin-bottom: 24px;
}

.path-local-edwiserstore .product-view-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.path-local-edwiserstore .product-view-list li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    font-size: 16px;
    color: #374151;
    line-height: 1.6;
}

.path-local-edwiserstore .product-view-list li:before {
    content: '•';
    position: absolute;
    left: 8px;
    color: var(--edw-primary);
    font-weight: bold;
}

/* Course Content Accordion (Remui style) */
.path-local-edwiserstore .product-view-content-section {
    margin-bottom: 32px;
}

.path-local-edwiserstore .accordion {
    width: 100%;
}

.path-local-edwiserstore .accordion-list-group {
    list-style: none;
    padding: 0;
    margin: 0;
}

.path-local-edwiserstore .accordion-list-item {
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 16px;
    color: #374151;
    transition: background 0.2s;
}

.path-local-edwiserstore .accordion-list-item:hover {
    /* background: #f9fafb; */
}

.path-local-edwiserstore .accordion-list-item.collapsed {
    background: #fff !important;
}

.path-local-edwiserstore .accordion-list-item:not(.collapsed) {
    /* background: #f5f8ff; */
}

.path-local-edwiserstore .accordion-list-item.d-flex {
    padding-left: 48px;
    cursor: default;
}

.path-local-edwiserstore .accordion-list-item.d-flex:hover {
    background: transparent;
}

.path-local-edwiserstore .accordion-list-item img {
    width: 20px;
    height: 20px;
    margin-right: 12px;
}

.path-local-edwiserstore .accordion-bb {
    border-bottom: 1px solid #e2e8f0;
}

.path-local-edwiserstore .p-pl-2 {
    padding-left: 16px;
}

.path-local-edwiserstore .edw-icon {
    font-size: 16px;
    transition: transform 0.3s;
}

.path-local-edwiserstore .accordion-list-item.collapsed .edw-icon {
    transform: rotate(-90deg);
}

.path-local-edwiserstore .collapse {
    display: none;
}

.path-local-edwiserstore .collapse.show {
    display: block;
}

/* Instructor Section */
.path-local-edwiserstore .product-view-instructor-section {
    margin-bottom: 32px;
}

.path-local-edwiserstore .product-view-instructor-card {
    display: flex;
    gap: 24px;
    padding: 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 24px;
}

.path-local-edwiserstore .product-view-instructor-profile {
    flex-shrink: 0;
}

.path-local-edwiserstore .product-view-instructor-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.path-local-edwiserstore .product-view-instructor-info {
    flex: 1;
}

.path-local-edwiserstore .product-view-instructor-name {
    font-size: 20px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 12px;
}

.path-local-edwiserstore .product-view-instructor-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #6c757d;
}

.path-local-edwiserstore .product-view-instructor-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.path-local-edwiserstore .product-view-instructor-meta-item i {
    color: var(--edw-primary);
}

.path-local-edwiserstore .product-view-instructor-meta-item a {
    color: var(--edw-primary);
    text-decoration: none;
}

.path-local-edwiserstore .product-view-instructor-meta-item a:hover {
    text-decoration: underline;
}

.path-local-edwiserstore .product-view-instructor-bio {
    font-size: 15px;
    color: #374151;
    line-height: 1.7;
}

/* Reviews Section */
.path-local-edwiserstore .product-view-reviews-section {
    margin-bottom: 32px;
}

.path-local-edwiserstore .product-view-reviews-summary {
    display: flex;
    gap: 48px;
    margin-bottom: 32px;
    padding: 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.path-local-edwiserstore .product-view-reviews-overall {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 200px;
}

.path-local-edwiserstore .product-view-reviews-average {
    font-size: 48px;
    font-weight: 700;
    color: #212529;
    line-height: 1;
    margin-bottom: 8px;
}

.path-local-edwiserstore .product-view-reviews-label {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 12px;
}

.path-local-edwiserstore .product-view-reviews-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.path-local-edwiserstore .product-view-reviews-stars .fa-star {
    font-size: 20px;
    color: #ffd700;
}

.path-local-edwiserstore .product-view-reviews-stars .fa-star:not(.filled) {
    color: #d1d5db;
}

.path-local-edwiserstore .product-view-reviews-count {
    font-size: 14px;
    color: #6c757d;
}

.path-local-edwiserstore .product-view-reviews-distribution {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.path-local-edwiserstore .product-view-review-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.path-local-edwiserstore .product-view-review-bar-container {
    flex: 1;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.path-local-edwiserstore .product-view-review-bar-fill {
    height: 100%;
    background: #ffd700;
    transition: width 0.3s;
}

.path-local-edwiserstore .product-view-review-bar-stars {
    display: flex;
    gap: 2px;
    min-width: 80px;
}

.path-local-edwiserstore .product-view-review-bar-stars .fa-star {
    font-size: 12px;
    color: #ffd700;
}

.path-local-edwiserstore .product-view-review-bar-stars .fa-star:not(.filled) {
    color: #d1d5db;
}

.path-local-edwiserstore .product-view-review-bar-percentage {
    font-size: 14px;
    color: #374151;
    min-width: 40px;
    text-align: right;
}

.path-local-edwiserstore .product-view-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.path-local-edwiserstore .product-view-review-item {
    padding: 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.path-local-edwiserstore .product-view-review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.path-local-edwiserstore .product-view-review-user {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.path-local-edwiserstore .product-view-review-user .userpicture {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.path-local-edwiserstore .product-view-review-user-info {
    flex: 1;
}

.path-local-edwiserstore .product-view-review-user-name {
    font-size: 16px;
    font-weight: 600;
    color: #212529;
    margin-bottom: 4px;
}

.path-local-edwiserstore .product-view-review-rating {
    font-size: 14px;
}

.path-local-edwiserstore .product-view-review-date {
    font-size: 14px;
    color: #6c757d;
}

.path-local-edwiserstore .product-view-review-text {
    font-size: 15px;
    color: #374151;
    line-height: 1.7;
}

/* Sidebar Styles */
.path-local-edwiserstore .product-view-sidebar-image {
    width: 100%;
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
}

.path-local-edwiserstore .product-view-sidebar-image img {
    width: 100%;
    height: auto;
    display: block;
}

.path-local-edwiserstore .product-view-pricing {
    padding: 0 24px;
    background: transparent;
    border: none;
    border-radius: 0;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.path-local-edwiserstore .product-view-price-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.path-local-edwiserstore .product-view-enrolled-text {
    color: #313848;
    text-transform: uppercase;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.path-local-edwiserstore .product-view-price-original {
    font-size: 18px;
    color: #9ca3af;
    text-decoration: line-through;
}

.path-local-edwiserstore .product-view-price-actual {
    font-size: 32px;
    font-weight: 700;
    color: var(--edw-primary);
}

.path-local-edwiserstore .product-view-sale-tag {
    display: inline-block;
    padding: 4px 8px;
    background: #ffd700;
    color: #212529;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
}

.path-local-edwiserstore .product-view-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.path-local-edwiserstore .product-view-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.path-local-edwiserstore .product-view-btn-cart {
    background: #fff;
    color: var(--edw-primary);
    border: 2px solid var(--edw-primary);
}

.path-local-edwiserstore .product-view-btn-cart:hover {
    background: #f5f8ff;
}

.path-local-edwiserstore .product-view-btn-buy {
    background: var(--edw-primary);
    color: #fff;
}

.path-local-edwiserstore .product-view-btn-buy:hover {
    background: var(--edw-primary-hover);
}

/* Course Info Sidebar */
.path-local-edwiserstore .product-view-course-info {
    padding: 0 24px;
    background: transparent;
    border: none;
    border-radius: 0;
}

.path-local-edwiserstore .course-info-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.path-local-edwiserstore .course-info-item:last-child {
    border-bottom: none;
}

.path-local-edwiserstore .course-info-item i {
    color: var(--edw-primary);
    font-size: 18px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.path-local-edwiserstore .course-info-label {
    flex: 1;
    font-size: 14px;
    color: #6c757d;
}

.path-local-edwiserstore .course-info-value {
    font-size: 14px;
    color: #212529;
    font-weight: 500;
}

/* Related Products Section */
.path-local-edwiserstore .product-view-related-products {
    margin-top: 48px;
    padding-top: 48px;
    border-top: 1px solid #e2e8f0;
}

.path-local-edwiserstore .related-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.path-local-edwiserstore .related-products-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #212529;
    margin: 0;
}

.path-local-edwiserstore .related-products-view-all {
    background: transparent;
    border: none;
    color: var(--edw-primary);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}

.path-local-edwiserstore .related-products-view-all:hover {
    text-decoration: underline;
}

.path-local-edwiserstore .related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

/* Custom Block Regions (full-width, outside the two-column layout) */
.path-local-edwiserstore .product-view-custom-region {
    margin-bottom: 24px;
}
/* Hide empty region wrappers when no blocks are present. */
.path-local-edwiserstore .product-view-custom-region:has(.block-region:empty) {
    display: none;
}
.path-local-edwiserstore .product-view-abv-blocks {
    margin-bottom: 24px;
}
.path-local-edwiserstore .product-view-blw-blocks {
    margin-top: 24px;
    margin-bottom: 0;
}
.path-local-edwiserstore .product-view-custom-region .block {
    margin-bottom: 16px;
}

/* Add block button inside custom regions during editing.
   Override Remui's `.add_block_button:not(.drawer .add_block_button) { display:none !important }`
   which has specificity (0,3,0). We need (0,4,0) to win. */
.path-local-edwiserstore .product-view-custom-region .block-region .add_block_button.add_block_button {
    display: block !important;
    text-align: center !important;
    padding: 16px !important;
}
.path-local-edwiserstore .product-view-custom-region .block-region .add_block_button .block-add {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px dashed #d1d5db !important;
    border-radius: 8px !important;
    padding: 12px 24px !important;
    color: #6c757d !important;
    text-decoration: none !important;
    background: #fff !important;
}
.path-local-edwiserstore .product-view-custom-region .block-region .add_block_button .block-add:hover {
    border-color: var(--edw-primary) !important;
    color: var(--edw-primary) !important;
    background: #f5f8ff !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .path-local-edwiserstore .product-view-top-wrapper {
        flex-direction: column;
    }

    .path-local-edwiserstore .product-view-sidebar-container {
        width: 100%;
    }

    .path-local-edwiserstore .product-view-header-container {
        width: 100%;
    }

    .path-local-edwiserstore .product-view-reviews-summary {
        flex-direction: column;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .local-edwiserstore-product-view-page {
        padding: 16px;
    }

    .path-local-edwiserstore .product-view-header-container {
        padding: 24px;
    }

    .path-local-edwiserstore .product-view-title {
        font-size: 24px;
    }

    .path-local-edwiserstore .product-view-header-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .path-local-edwiserstore .product-view-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0 16px;
    }

    .path-local-edwiserstore .product-view-tab {
        white-space: nowrap;
        padding: 12px 16px;
    }

    .path-local-edwiserstore .product-view-tab-content {
        padding: 16px;
    }

    .path-local-edwiserstore .product-view-instructor-card {
        flex-direction: column;
    }

    .path-local-edwiserstore .related-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
}

/* Card View */
.path-local-edwiserstore .shop-products-container.shop-view-card {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fill,
            minmax(344px, 1fr)
        ); /* Figma: card width 344px */
    gap: 24px;
    width: 100%;
}

/* Card wrapper - should not interfere with grid layout */
.path-local-edwiserstore .shop-product-card-wrapper {
    width: 100%;
}

/* Responsive grid columns */
@media (min-width: 576px) {
    .path-local-edwiserstore .shop-products-container.shop-view-card {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .path-local-edwiserstore .shop-products-container.shop-view-card {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .path-local-edwiserstore .shop-products-container.shop-view-card {
        grid-template-columns: repeat(4, 1fr);
    }
}

.path-local-edwiserstore .shop-product-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    overflow: hidden;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
    width: 100%;
    min-width: 0; /* Prevent flex items from expanding beyond container */
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: none;
}

.path-local-edwiserstore .shop-product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.path-local-edwiserstore .shop-product-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0; /* Prevent flex items from expanding beyond container */
    width: 100%;
}

.path-local-edwiserstore .shop-product-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 344 / 200; /* Figma grid view image 344x200 */
    overflow: hidden;
    background: #f3f4f6;
    border-radius: 8px 8px 0 0;
}

.path-local-edwiserstore .shop-product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.path-local-edwiserstore .shop-product-label {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px; /* tighter padding */
    height: 24px;
    border-radius: 3px; /* match Figma tag */
    font-size: 12px; /* slightly smaller text */
    font-weight: 600;
    background-color: #fff;
    color: var(--edw-primary-dark);
    z-index: 10;
    letter-spacing: 0.05em; /* subtle spacing */
    line-height: 1;
}

/* Category tag positioned below image, centered */
.path-local-edwiserstore .shop-product-category-tag {
    background: var(--edw-primary-light);
    color: #313848;
    margin: -12px auto 12px 12px; /* center horizontally */
    padding: 4px 12px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    font-weight: 600;
    z-index: 5;
    position: relative;
    display: block; /* allows auto margins */
    width: fit-content;
    max-width: calc(100% - 32px); /* Safety fallback */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    text-align: center;
    font-size: 12px;
}

.path-local-edwiserstore .shop-product-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.path-local-edwiserstore .shop-product-title {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 14px;
    margin-top: 0;
    color: #313848;
    line-height: 24px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.path-local-edwiserstore .shop-product-title a {
    color: #313848;
    text-decoration: none;
}

.path-local-edwiserstore .shop-product-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 13px;
    color: #6b7280;
    flex-wrap: wrap;
    justify-content: space-between;
}

.path-local-edwiserstore .shop-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.path-local-edwiserstore .shop-meta-item i {
    font-size: 12px;
}

/* Star icon styling for ratings - yellow/gold color */
.path-local-edwiserstore .shop-meta-item i.fa-star {
    color: #f59e0b; /* Amber/yellow color matching design */
    font-size: 13px;
}

/* Footer section with price and button */
.path-local-edwiserstore .shop-product-footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
}

.path-local-edwiserstore .shop-product-price {
    font-size: 16px;
    font-weight: 700;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
}

.path-local-edwiserstore .shop-price-free,
.path-local-edwiserstore .shop-price-enrolled,
.path-local-edwiserstore .shop-price-actual {
    color: var(--edw-primary);
}

.path-local-edwiserstore .shop-price-free,
.path-local-edwiserstore .shop-price-enrolled {
    color: #313848 !important;
    text-transform: uppercase !important;
    font-size: 14px !important;
    font-weight: 700 !important;
}

.path-local-edwiserstore .shop-price-original {
    color: #9ca3af;
    text-decoration: line-through;
    font-size: 14px;
    font-weight: 400;
    margin-right: 0;
    line-height: 1.2;
}

.path-local-edwiserstore .shop-product-btn {
    padding: 8px 16px;
    background: white;
    color: var(--edw-primary-alt);
    border: 1px solid var(--edw-primary-alt);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.4;
    height: fit-content;
}

.path-local-edwiserstore .shop-product-btn:hover {
    background: var(--edw-primary-alt);
    color: white;
    border-color: var(--edw-primary-alt);
}

/* Design fixes */
#page-local-edwiserstore-productview #page {
    padding: 0 !important;
}

#page-local-edwiserstore-productview #topofscroll {
    padding: 0 !important;
    max-width: 100% !important;
}

#page-local-edwiserstore-productview #page-content div[role='main'] {
    padding: 0 !important;
}

#page-local-edwiserstore-productview #page-header {
    display: none !important;
}

#page-local-edwiserstore-productview .local-edwiserstore-product-view-page {
    max-width: 1320px !important;
    margin: 0 auto !important;
}

#page-local-edwiserstore-productview
.product-view-sidebar-container
.product-view-pricing {
    padding: 24px !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

#page-local-edwiserstore-productview .product-view-price-row {
    line-height: 1 !important;
}

#page-local-edwiserstore-productview .product-view-sidebar-image {
    margin-bottom: 0 !important;
    border-radius: 8px 8px 0 0 !important;
}

#page-local-edwiserstore-productview .product-view-pricing {
    margin-bottom: 0 !important;
}

#page-local-edwiserstore-productview .product-view-course-info {
    padding: 24px !important;
}

#page-local-edwiserstore-productview
.product-view-course-info
.course-info-item
i {
    color: #5b6880;
}

#page-local-edwiserstore-productview
#productContentAccordion
.accordion-list-item {
    background: #fff;
}

.path-local-edwiserstore .product-view-pricing .product-view-price-original {
    font-size: 32px;
}

#page-local-edwiserstore-productview .product-view-top-wrapper {
    gap: 32px;
}

.path-local-edwiserstore .product-view-btn {
    font-size: 14px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.path-local-edwiserstore .accordion-list-item .arrow {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid #5b6880;
    border-bottom: 2px solid #5b6880;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.path-local-edwiserstore .accordion-list-item.collapsed .arrow {
    transform: rotate(45deg);
}

.path-local-edwiserstore .accordion-list-item:not(.collapsed) .arrow {
    transform: rotate(-135deg);
}

.path-local-edwiserstore .subsection-wrapper .accordion-list-item .arrow {
    margin-right: 5px;
}

#page-local-edwiserstore-productview #reviewarea .ratings-block-wrapper {
    justify-content: space-around;
}

#page-local-edwiserstore-productview
#reviewarea
.btn.btn-outline-primary.border {
    border: 1px solid #dee2e6 !important;
    background: #fff;
    color: #5b6880;
}

#page-local-edwiserstore-productview
#reviewarea
.btn.btn-outline-primary.border:hover {
    background: #f8f9fa;
    color: #212529;
}

#page-local-edwiserstore-productview
#reviewarea
.reviewslist
.delete-comment-container {
    display: none !important;
}

#page-local-edwiserstore-productview
#reviewarea
.reviewslist
.reviewer-card
.border-bottom {
    border-bottom: none !important;
}

/* Bundle per-course review areas: hidden by default, visible when active */
.path-local-edwiserstore .bundle-course-reviewarea {
    display: none;
}
.path-local-edwiserstore .bundle-course-reviewarea.active {
    display: block;
}

.path-local-edwiserstore .product-view-bundle-courses {
    padding: 24px !important;
    padding-bottom: 0 !important;
}

/* Bundle label badge on related-products shop card image */
.path-local-edwiserstore .shop-label-bundle {
    background-color: #671dcf;
    color: #fff;
    font-size: 12px !important;
    font-weight: 600;
    border-radius: 3px;
    padding: 4px 8px;
    line-height: 1.2;
}

/* Bundle courses hover popup on related-products shop card */
.path-local-edwiserstore .shop-bundle-courses-trigger {
    position: relative;
    cursor: default;
}

.path-local-edwiserstore .shop-bundle-courses-popup {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    padding: 8px 12px;
    min-width: 180px;
    max-width: 260px;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

.path-local-edwiserstore .shop-bundle-courses-trigger:hover .shop-bundle-courses-popup {
    opacity: 1;
    pointer-events: auto;
}

.path-local-edwiserstore .shop-bundle-course-item {
    font-size: 12px;
    color: #374151;
    padding: 3px 0;
    line-height: 1.4;
    border-bottom: 1px solid #f3f4f6;
}

.path-local-edwiserstore .shop-bundle-course-item:last-child {
    border-bottom: none;
}
/* stylelint-enable declaration-no-important */
