/* ============================================================================
   M31 LABS - WOOCOMMERCE STYLING
   Single Product & Archive Pages
   Brand: Black BG, Gold rgb(201,162,75), Cream rgb(207,202,189)
   Font: Space Grotesk primary, Helvetica Neue fallback
   ============================================================================ */

/* ============================================================================
   RESET & GLOBAL
   ============================================================================ */

.woocommerce {
    background-color: #000;
    color: #e8e8e8;
    font-family: 'Space Grotesk', 'Helvetica Neue', sans-serif;
}

.woocommerce body {
    background-color: #000;
}

.woocommerce a {
    color: rgb(201, 162, 75);
    text-decoration: none;
    transition: color 0.2s ease;
}

.woocommerce a:hover {
    color: rgb(207, 202, 189);
}

/* ============================================================================
   SINGLE PRODUCT PAGE - 2 COLUMN LAYOUT
   ============================================================================ */

.m31-single-product-wrapper {
    background-color: #000;
    padding: 60px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.m31-product-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    margin-bottom: 80px;
}

/* LEFT COLUMN - GALLERY */
.m31-product-gallery {
    width: 100%;
}

.m31-product-gallery .woocommerce-product-gallery {
    margin: 0;
}

.m31-product-gallery .woocommerce-product-gallery__image {
    margin-bottom: 20px;
}

.m31-product-gallery .woocommerce-product-gallery__image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.m31-product-gallery .flex-viewport {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
}

.m31-product-gallery .flex-control-thumbs {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

.m31-product-gallery .flex-control-thumbs li {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
}

.m31-product-gallery .flex-control-thumbs img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.m31-product-gallery .flex-control-thumbs li.flex-active img {
    border-color: rgb(201, 162, 75);
}

/* RIGHT COLUMN - INFO */
.m31-product-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* TITLE & PRICE */
.m31-product-header {
    border-bottom: 1px solid rgba(201, 162, 75, 0.3);
    padding-bottom: 24px;
}

.m31-product-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
    margin: 0 0 16px 0;
    font-family: 'Space Grotesk', 'Helvetica Neue', sans-serif;
}

.m31-product-price-section {
    font-size: 28px;
    font-weight: 600;
    color: rgb(201, 162, 75);
}

.m31-product-price-section .price {
    font-size: 28px;
    color: rgb(201, 162, 75);
}

.m31-product-price-section .woocommerce-price-amount {
    font-size: 28px;
}

.m31-product-price-section .woocommerce-Price-amount {
    font-size: 28px;
}

/* VERIFICATION BADGES */
.m31-verification-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 0;
}

.m31-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.m31-badge-purity {
    background-color: rgba(201, 162, 75, 0.15);
    border: 1px solid rgb(201, 162, 75);
    color: rgb(201, 162, 75);
}

.m31-badge-purity .m31-badge-label {
    font-size: 11px;
    opacity: 0.8;
}

.m31-badge-purity .m31-badge-value {
    font-size: 16px;
    font-weight: 700;
}

.m31-badge-verified {
    background-color: rgba(207, 202, 189, 0.1);
    border: 1px solid rgba(207, 202, 189, 0.5);
    color: rgba(207, 202, 189, 0.9);
    align-items: center;
    flex-wrap: wrap;
}

.m31-badge-verified .m31-checkmark {
    font-size: 16px;
    color: rgb(201, 162, 75);
}

.m31-badge-verified .m31-badge-link {
    margin-left: 8px;
    padding-left: 8px;
    border-left: 1px solid rgba(207, 202, 189, 0.3);
    color: rgb(201, 162, 75);
    font-size: 11px;
    text-decoration: underline;
}

.m31-badge-verified .m31-badge-link:hover {
    color: rgb(207, 202, 189);
}

/* PRODUCT EXCERPT */
.m31-product-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(232, 232, 232, 0.85);
}

/* ADD TO CART SECTION */
.m31-add-to-cart-section {
    padding: 12px 0;
}

.m31-add-to-cart-section .quantity {
    display: inline-flex;
    align-items: center;
    gap: 0;
    margin-right: 12px;
}

.m31-add-to-cart-section .quantity input {
    width: 60px;
    padding: 10px 12px;
    border: 1px solid rgba(201, 162, 75, 0.4);
    background-color: #1a1a1a;
    color: #fff;
    text-align: center;
    font-family: inherit;
}

.m31-add-to-cart-section .quantity button {
    width: 40px;
    padding: 0;
    background-color: rgba(201, 162, 75, 0.2);
    border: 1px solid rgba(201, 162, 75, 0.4);
    color: rgb(201, 162, 75);
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.m31-add-to-cart-section .quantity button:hover {
    background-color: rgba(201, 162, 75, 0.4);
}

.m31-add-to-cart-section .single_add_to_cart_button {
    padding: 14px 40px;
    background-color: rgb(201, 162, 75);
    color: #000;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.m31-add-to-cart-section .single_add_to_cart_button:hover {
    background-color: rgb(207, 202, 189);
    color: #000;
}

.m31-add-to-cart-section .single_add_to_cart_button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* PRODUCT DETAILS GRID */
.m31-product-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding-top: 12px;
    border-top: 1px solid rgba(201, 162, 75, 0.2);
}

.m31-detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.m31-detail-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(201, 162, 75, 0.8);
}

.m31-detail-value {
    font-size: 14px;
    font-weight: 600;
    color: rgba(232, 232, 232, 0.9);
}

/* RESEARCH INFO CTA */
.m31-research-cta {
    padding-top: 12px;
    text-align: center;
}

.m31-research-link {
    display: inline-block;
    padding: 10px 0;
    color: rgb(201, 162, 75);
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.m31-research-link:hover {
    color: rgb(207, 202, 189);
}

/* ============================================================================
   PRODUCT TABS & FULL WIDTH SECTIONS BELOW
   ============================================================================ */

.m31-product-tabs-section {
    background-color: #000;
    padding: 60px 0;
    border-top: 1px solid rgba(201, 162, 75, 0.2);
}

/* WOOCOMMERCE TABS */
.woocommerce-tabs {
    margin: 0;
}

.woocommerce-tabs .nav-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(201, 162, 75, 0.2);
    margin: 0;
    padding: 0;
}

.woocommerce-tabs .nav-tabs li {
    margin: 0;
    padding: 0;
}

.woocommerce-tabs .nav-tabs a {
    display: block;
    padding: 16px 24px;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(232, 232, 232, 0.6);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.woocommerce-tabs .nav-tabs a:hover {
    color: rgb(201, 162, 75);
    border-bottom-color: rgba(201, 162, 75, 0.3);
}

.woocommerce-tabs .nav-tabs a.active,
.woocommerce-tabs .nav-tabs li.active a {
    color: rgb(201, 162, 75);
    border-bottom-color: rgb(201, 162, 75);
}

.woocommerce-tabs .tab-content {
    padding: 40px 0;
}

.woocommerce-tabs .tab-pane {
    display: none;
}

.woocommerce-tabs .tab-pane.active {
    display: block;
}

/* DESCRIPTION TAB */
.woocommerce-tabs .woocommerce-Tabs-panel--description {
    color: rgba(232, 232, 232, 0.85);
    line-height: 1.8;
}

/* RESEARCH CITATIONS SECTION */
.m31-research-citations-section {
    padding: 60px 0;
    border-top: 1px solid rgba(201, 162, 75, 0.2);
}

.m31-research-citations-section h3 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 24px;
}

.m31-citations-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.m31-citation-item {
    padding: 12px 16px;
    background-color: rgba(201, 162, 75, 0.08);
    border-left: 3px solid rgb(201, 162, 75);
    border-radius: 2px;
    font-size: 13px;
    line-height: 1.6;
    color: rgba(232, 232, 232, 0.85);
}

/* ============================================================================
   ARCHIVE / SHOP PAGE - FULL WIDTH GRID
   ============================================================================ */

.m31-archive-wrapper {
    background-color: #000;
    padding: 60px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ARCHIVE HEADER */
.m31-archive-header {
    margin-bottom: 60px;
}

.m31-archive-header-content {
    margin-bottom: 32px;
}

.m31-archive-title {
    font-size: 42px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px 0;
}

.m31-archive-desc {
    font-size: 14px;
    color: rgba(232, 232, 232, 0.7);
    line-height: 1.6;
    margin: 0;
}

/* ARCHIVE CONTROLS (Sort, Filter) */
.m31-archive-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
    border-top: 1px solid rgba(201, 162, 75, 0.2);
    border-bottom: 1px solid rgba(201, 162, 75, 0.2);
}

.woocommerce-result-count {
    font-size: 12px;
    color: rgba(232, 232, 232, 0.6);
}

.woocommerce-ordering select {
    padding: 8px 12px;
    background-color: rgba(201, 162, 75, 0.1);
    border: 1px solid rgba(201, 162, 75, 0.3);
    color: rgba(232, 232, 232, 0.85);
    font-family: inherit;
    font-size: 12px;
    cursor: pointer;
}

/* PRODUCTS GRID */
.m31-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

/* PRODUCT CARD */
.m31-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease;
}

.m31-product-card:hover {
    transform: translateY(-4px);
}

/* PRODUCT IMAGE WRAPPER */
.m31-product-image-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
}

.m31-product-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.m31-product-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.m31-product-card:hover .m31-product-image-wrapper img {
    transform: scale(1.05);
}

/* VERIFICATION BADGES (INLINE) */
.m31-card-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.m31-badge-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 12px;
    backdrop-filter: blur(8px);
}

.m31-badge-inline.m31-badge-purity {
    background-color: rgba(201, 162, 75, 0.85);
    color: #000;
}

.m31-badge-inline.m31-badge-verified {
    background-color: rgba(207, 202, 189, 0.85);
    color: #000;
    font-size: 20px;
}

/* CARD OVERLAY (HOVER) */
.m31-card-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.m31-product-card:hover .m31-card-overlay {
    opacity: 1;
}

.m31-card-view-btn {
    padding: 12px 32px;
    background-color: rgb(201, 162, 75);
    color: #000;
    border-radius: 4px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.2s ease;
}

.m31-card-view-btn:hover {
    background-color: rgb(207, 202, 189);
}

/* PRODUCT CARD INFO */
.m31-product-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.m31-product-card-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.m31-product-card-title:hover {
    color: rgb(201, 162, 75);
}

/* CARD PRICE */
.m31-product-card-price {
    font-size: 16px;
    font-weight: 700;
    color: rgb(201, 162, 75);
    margin-top: 4px;
}

.m31-product-card-price .price {
    color: rgb(201, 162, 75);
}

/* CARD RATING */
.m31-product-card-rating {
    font-size: 12px;
    margin: 4px 0;
}

.m31-product-card-rating .star-rating {
    color: rgb(201, 162, 75);
}

/* CARD ADD TO CART BUTTON */
.m31-product-card-button {
    margin-top: auto;
    padding-top: 8px;
}

.m31-product-card-button a,
.m31-product-card-button button {
    display: inline-block;
    width: 100%;
    padding: 12px 16px;
    background-color: rgba(201, 162, 75, 0.15);
    border: 1px solid rgb(201, 162, 75);
    color: rgb(201, 162, 75);
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-decoration: none;
}

.m31-product-card-button a:hover,
.m31-product-card-button button:hover {
    background-color: rgb(201, 162, 75);
    color: #000;
}

/* NO PRODUCTS */
.woocommerce-info {
    background-color: rgba(201, 162, 75, 0.1);
    border: 1px solid rgba(201, 162, 75, 0.3);
    color: rgba(232, 232, 232, 0.85);
    padding: 20px;
    border-radius: 4px;
}

/* PAGINATION */
.woocommerce-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.woocommerce-pagination a,
.woocommerce-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(201, 162, 75, 0.3);
    background-color: transparent;
    color: rgba(232, 232, 232, 0.6);
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    transition: all 0.2s ease;
}

.woocommerce-pagination a:hover {
    background-color: rgb(201, 162, 75);
    color: #000;
    border-color: rgb(201, 162, 75);
}

.woocommerce-pagination .current {
    background-color: rgb(201, 162, 75);
    color: #000;
    border-color: rgb(201, 162, 75);
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 1024px) {
    .m31-archive-wrapper {
        padding: 40px 24px;
    }
    
    .m31-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .m31-single-product-wrapper {
        padding: 40px 24px;
    }
    
    .m31-product-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .m31-product-title {
        font-size: 28px;
    }
    
    .m31-product-price-section {
        font-size: 24px;
    }
    
    .m31-verification-badges {
        flex-direction: column;
    }
    
    .m31-product-details-grid {
        grid-template-columns: 1fr;
    }
    
    .m31-archive-wrapper {
        padding: 40px 20px;
    }
    
    .m31-archive-title {
        font-size: 32px;
    }
    
    .m31-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
    }
    
    .m31-archive-controls {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .m31-single-product-wrapper {
        padding: 24px 16px;
    }
    
    .m31-product-container {
        gap: 24px;
    }
    
    .m31-product-title {
        font-size: 20px;
    }
    
    .m31-product-price-section {
        font-size: 20px;
    }
    
    .m31-archive-wrapper {
        padding: 24px 16px;
    }
    
    .m31-archive-title {
        font-size: 24px;
    }
    
    .m31-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }
    
    .m31-badge-inline {
        width: 40px;
        height: 40px;
        font-size: 10px;
    }
}
