/* ============================================
   WOOCOMMERCE CUSTOM STYLES
   ============================================ */

/* PRODUCT GRID */
.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.product {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    position: relative;
}

.product:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* PRODUCT IMAGE */
.product-image-wrapper {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background: var(--accent-color);
}

.product-image-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

/* PRODUCT BADGES */
.product-badges {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 2;
}

.product-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-sale {
    background: var(--secondary-color);
    color: var(--white);
}

.badge-new {
    background: var(--success-color);
    color: var(--white);
}

.badge-featured {
    background: var(--primary-color);
    color: var(--white);
}

.badge-out-of-stock {
    background: var(--error-color);
    color: var(--white);
}

.badge-smart {
    background: #007bff;
    color: var(--white);
}

/* PRODUCT QUICK ACTIONS */
.product-quick-actions {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: 2;
}

.product:hover .product-quick-actions {
    opacity: 1;
}

.quick-action-btn {
    width: 40px;
    height: 40px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.quick-action-btn:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: scale(1.1);
}

/* PRODUCT INFO */
.product-info {
    padding: 20px;
}

.product-category {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.woocommerce-loop-product__title {
    font-size: 16px;
    margin: 0 0 10px;
    color: var(--primary-color);
    font-weight: 600;
    line-height: 1.4;
}

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

/* PRODUCT RATING */
.star-rating {
    margin-bottom: 10px;
}

.woocommerce-product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.woocommerce-review-link {
    font-size: 12px;
    color: #999;
    text-decoration: none;
}

.woocommerce-review-link:hover {
    color: var(--secondary-color);
}

/* PRODUCT SPECS */
.product-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0;
    font-size: 12px;
    color: #666;
}

.product-spec {
    display: flex;
    align-items: center;
    gap: 5px;
}

.product-spec i {
    color: var(--secondary-color);
}

/* PRODUCT PRICE */
.price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    font-weight: bold;
}

.price .amount,
.price ins .amount {
    font-size: 22px;
    color: var(--primary-color);
}

.price del {
    font-size: 16px;
    color: #999;
    font-weight: normal;
}

.price ins {
    text-decoration: none;
}

/* ADD TO CART BUTTON */
.add_to_cart_button,
.product_type_simple,
.product_type_variable {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
    text-decoration: none;
    display: block;
}

.add_to_cart_button:hover,
.product_type_simple:hover,
.product_type_variable:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.add_to_cart_button.loading {
    opacity: 0.6;
    cursor: wait;
}

.add_to_cart_button.added {
    background: var(--success-color);
}

/* SINGLE PRODUCT PAGE */
.single-product-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
}

.product-main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: var(--spacing-xl);
}

/* PRODUCT GALLERY */
.product-gallery-wrapper {
    position: sticky;
    top: 100px;
}

.woocommerce-product-gallery {
    position: relative;
}

.woocommerce-product-gallery__wrapper {
    margin: 0;
}

.woocommerce-product-gallery__image {
    margin-bottom: 15px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.woocommerce-product-gallery__trigger {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
    width: 40px;
    height: 40px;
    background: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.woocommerce-product-gallery__trigger:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: scale(1.1);
}

/* PRODUCT GALLERY INFO */
.product-gallery-info {
    margin-top: 20px;
}

.trust-badges {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--accent-color);
    border-radius: var(--radius-md);
    font-size: 14px;
}

.trust-badge i {
    color: var(--secondary-color);
    font-size: 20px;
}

/* PRODUCT SUMMARY */
.product-summary-wrapper {
    /* Styling for summary wrapper */
}

.summary {
    /* Product summary styles */
}

.product_title {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 300;
}

.product-brand {
    display: block;
    font-size: 14px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.woocommerce-product-rating {
    margin-bottom: 20px;
}

/* PRODUCT META */
.product_meta {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--light-gray);
    font-size: 14px;
}

.product_meta > span {
    display: block;
    margin-bottom: 10px;
}

.product_meta a {
    color: var(--text-color);
    text-decoration: none;
}

.product_meta a:hover {
    color: var(--secondary-color);
}

/* PRODUCT KEY FEATURES */
.product-key-features {
    margin: 30px 0;
    padding: 25px;
    background: var(--accent-color);
    border-radius: var(--radius-lg);
}

.features-title {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.feature-item i {
    color: var(--secondary-color);
    font-size: 18px;
    width: 25px;
}

.feature-label {
    color: #666;
}

.feature-value {
    font-weight: 600;
    color: var(--primary-color);
}

/* PRODUCT AVAILABILITY */
.product-availability-info {
    margin: 20px 0;
}

.stock {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border-radius: var(--radius-md);
    font-weight: 500;
}

.stock.in-stock {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.stock.out-of-stock {
    background: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
}

/* PRODUCT QUICK ACTIONS IN SUMMARY */
.product-quick-actions {
    display: flex;
    gap: 15px;
    margin: 20px 0;
}

.product-quick-actions button {
    flex: 1;
    padding: 12px;
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.product-quick-actions button:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

/* PRODUCT SUPPORT BOX */
.product-support-box {
    margin: 30px 0;
    padding: 25px;
    background: var(--accent-color);
    border-radius: var(--radius-lg);
    text-align: center;
}

.product-support-box h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.product-support-box p {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

/* PRODUCT TABS */
.woocommerce-tabs {
    margin-top: var(--spacing-xl);
}

.woocommerce-tabs ul.tabs {
    display: flex;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 2px solid var(--light-gray);
}

.woocommerce-tabs ul.tabs li {
    margin: 0;
}

.woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 15px 30px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all var(--transition-base);
}

.woocommerce-tabs ul.tabs li.active a,
.woocommerce-tabs ul.tabs li a:hover {
    color: var(--secondary-color);
    border-bottom-color: var(--secondary-color);
}

.woocommerce-Tabs-panel {
    padding: 30px 0;
}

/* SPECIFICATIONS TABLE */
.specifications-table-wrapper {
    overflow-x: auto;
}

.specifications-table {
    width: 100%;
    border-collapse: collapse;
}

.specifications-table th,
.specifications-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.specifications-table th {
    font-weight: 600;
    color: var(--primary-color);
    width: 40%;
}

.specifications-table td {
    color: var(--text-color);
}

.specifications-table tr:last-child th,
.specifications-table tr:last-child td {
    border-bottom: none;
}

/* RELATED & UPSELL PRODUCTS */
.related.products,
.upsells.products,
.compatible-products-section,
.recently-viewed-section {
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--light-gray);
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-top: -20px;
    margin-bottom: 30px;
}

/* CART PAGE */
.woocommerce-cart-form {
    margin-bottom: var(--spacing-lg);
}

.shop_table {
    width: 100%;
    border-collapse: collapse;
}

.shop_table th,
.shop_table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid var(--light-gray);
}

.shop_table th {
    background: var(--accent-color);
    font-weight: 600;
    color: var(--primary-color);
}

.product-thumbnail img {
    max-width: 100px;
    border-radius: var(--radius-md);
}

.product-name a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.product-name a:hover {
    color: var(--secondary-color);
}

.product-quantity input {
    width: 80px;
    padding: 8px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    text-align: center;
}

.product-remove a {
    color: var(--error-color);
    font-size: 20px;
}

.product-remove a:hover {
    color: #c82333;
}

/* CART TOTALS */
.cart-collaterals {
    margin-top: var(--spacing-lg);
}

.cart_totals {
    background: var(--accent-color);
    padding: 30px;
    border-radius: var(--radius-lg);
}

.cart_totals h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.cart_totals table {
    width: 100%;
}

.cart_totals th,
.cart_totals td {
    padding: 15px 0;
    border-bottom: 1px solid var(--light-gray);
}

.cart_totals th {
    font-weight: 500;
}

.order-total th,
.order-total td {
    font-size: 20px;
    font-weight: bold;
    border-bottom: none;
}

/* CHECKOUT PAGE */
.woocommerce-checkout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.woocommerce-billing-fields,
.woocommerce-shipping-fields {
    margin-bottom: 30px;
}

.woocommerce-billing-fields h3,
.woocommerce-shipping-fields h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

.form-row {
    margin-bottom: 20px;
}

.woocommerce-checkout-review-order {
    background: var(--accent-color);
    padding: 30px;
    border-radius: var(--radius-lg);
    position: sticky;
    top: 100px;
}

.woocommerce-checkout-review-order h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

#payment {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius-md);
    margin-top: 20px;
}

#payment .payment_methods {
    list-style: none;
    padding: 0;
    margin: 0;
}

#payment .payment_method {
    margin-bottom: 15px;
}

#payment .payment_method label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 15px;
    background: var(--accent-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

#payment .payment_method input[type="radio"]:checked + label {
    background: var(--secondary-color);
    color: var(--white);
}

#place_order {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    margin-top: 20px;
}

/* MY ACCOUNT PAGE */
.woocommerce-account .woocommerce-MyAccount-navigation {
    background: var(--accent-color);
    padding: 20px;
    border-radius: var(--radius-lg);
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation li {
    margin-bottom: 10px;
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
    display: block;
    padding: 12px 15px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation a:hover {
    background: var(--secondary-color);
    color: var(--white);
}

/* MESSAGES */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 15px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.woocommerce-message {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.woocommerce-info {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
    border-left: 4px solid #007bff;
}

.woocommerce-error {
    background: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
    border-left: 4px solid var(--error-color);
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 20px;
}

.woocommerce-message::before {
    content: '\f058'; /* check-circle */
}

.woocommerce-info::before {
    content: '\f05a'; /* info-circle */
}

.woocommerce-error::before {
    content: '\f06a'; /* exclamation-circle */
}

/* SHOP TOOLBAR */
.woocommerce-ordering {
    margin-bottom: 30px;
}

.woocommerce-result-count {
    font-size: 14px;
    color: #666;
}

.woocommerce-ordering select {
    padding: 10px 15px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    background: var(--white);
    cursor: pointer;
}

.woocommerce-ordering select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

/* FILTERS SIDEBAR */
.widget_price_filter .price_slider {
    margin-bottom: 20px;
}

.widget_price_filter .price_slider_amount {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.widget_price_filter .price_label {
    font-weight: 600;
}

.widget_layered_nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget_layered_nav li {
    margin-bottom: 10px;
}

.widget_layered_nav a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.widget_layered_nav a:hover,
.widget_layered_nav li.chosen a {
    background: var(--accent-color);
    color: var(--secondary-color);
}

.widget_layered_nav .count {
    font-size: 12px;
    color: #999;
}

/* QUICK VIEW MODAL */
.quick-view-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.quick-view-gallery {
    /* Gallery styles */
}

.quick-view-summary {
    /* Summary styles */
}

/* SALE FLASH */
.onsale {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--secondary-color);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

/* PRODUCT VARIATIONS */
.variations {
    margin-bottom: 20px;
}

.variations tr {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.variations label {
    margin-bottom: 8px;
    font-weight: 500;
}

.variations select {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
}

.variations .reset_variations {
    margin-top: 10px;
    font-size: 14px;
    color: var(--secondary-color);
    text-decoration: none;
}

.variations .reset_variations:hover {
    text-decoration: underline;
}

/* QUANTITY INPUT */
.quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.quantity label {
    margin: 0;
    font-weight: 500;
}

.quantity input[type="number"] {
    width: 80px;
    padding: 10px;
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    text-align: center;
}

/* REVIEWS */
#reviews {
    margin-top: var(--spacing-lg);
}

#reviews h2 {
    font-size: 24px;
    margin-bottom: 30px;
}

.woocommerce-Reviews {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.commentlist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--light-gray);
}

.comment:last-child {
    border-bottom: none;
}

.comment_container {
    display: flex;
    gap: 20px;
}

.comment-text {
    flex: 1;
}

.meta {
    margin-bottom: 10px;
}

.woocommerce-review__author {
    font-weight: 600;
    color: var(--primary-color);
}

.woocommerce-review__published-date {
    font-size: 14px;
    color: #999;
    margin-left: 10px;
}

.description p {
    margin-bottom: 10px;
}

#review_form_wrapper {
    background: var(--accent-color);
    padding: 30px;
    border-radius: var(--radius-lg);
}

#review_form_wrapper h3 {
    font-size: 20px;
    margin-bottom: 20px;
}

.comment-form-rating {
    margin-bottom: 20px;
}

.comment-form-rating label {
    display: block;
    margin-bottom: 10px;
}

.stars {
    display: flex;
    gap: 5px;
}

.stars a {
    font-size: 24px;
    color: var(--light-gray);
    text-decoration: none;
    transition: color var(--transition-base);
}

.stars a:hover,
.stars a.active {
    color: var(--secondary-color);
}

/* RESPONSIVE STYLES */
@media (max-width: 1200px) {
    .products {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .product-main-content {
        gap: 40px;
    }
}

@media (max-width: 992px) {
    .products {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .product-main-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .product-gallery-wrapper {
        position: static;
    }
    
    .woocommerce-checkout {
        grid-template-columns: 1fr;
    }
    
    .woocommerce-checkout-review-order {
        position: static;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .woocommerce-Reviews {
        grid-template-columns: 1fr;
    }
    
    .quick-view-content {
        grid-template-columns: 1fr;
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .product-info {
        padding: 15px;
    }
    
    .woocommerce-loop-product__title {
        font-size: 14px;
    }
    
    .price .amount,
    .price ins .amount {
        font-size: 18px;
    }
    
    .product_title {
        font-size: 24px;
    }
    
    .woocommerce-tabs ul.tabs {
        flex-wrap: wrap;
    }
    
    .woocommerce-tabs ul.tabs li a {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .shop_table th,
    .shop_table td {
        padding: 10px;
        font-size: 14px;
    }
    
    .product-thumbnail img {
        max-width: 60px;
    }
}

@media (max-width: 480px) {
    .products {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .product-badges {
        top: 10px;
        right: 10px;
    }
    
    .product-badge {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .product-quick-actions {
        display: none;
    }
    
    .quick-action-btn {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .product-specs {
        font-size: 11px;
        gap: 8px;
    }
    
    .trust-badge {
        font-size: 12px;
    }
    
    .specifications-table th,
    .specifications-table td {
        padding: 10px;
        font-size: 13px;
    }
}