/**
 * Marvbazar WooCommerce Styles
 *
 * @package Marvbazar
 * @since 1.0.0
 */

/* ===== Product Card ===== */
.product-card {
    background: #ffffff;
    border: 1px solid var(--color-g-gray-150);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    position: relative;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.product-card__inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card__image {
    position: relative;
    padding-top: 100%;
    overflow: hidden;
    background-color: var(--color-g-gray-50);
}

.product-card__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card__image img {
    transform: scale(1.05);
}

.product-card__badges {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 2;
}

.product-card__badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

.product-card__badge--sale {
    background-color: var(--color-google-red);
    color: #ffffff;
}

.product-card__badge--new {
    background-color: var(--color-google-green);
    color: #ffffff;
}

.product-card__badge--out-of-stock {
    background-color: var(--color-g-gray-600);
    color: #ffffff;
}

.product-card__actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    z-index: 2;
}

.product-card:hover .product-card__actions {
    opacity: 1;
    transform: translateX(0);
}

.product-card__quick-view,
.product-card__wishlist {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #ffffff;
    border: 1px solid var(--color-g-gray-200);
    border-radius: 50%;
    color: var(--color-g-gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-card__quick-view:hover,
.product-card__wishlist:hover {
    background: var(--color-google-blue);
    border-color: var(--color-google-blue);
    color: #ffffff;
}

.product-card__content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card__title {
    font-size: 0.9375rem;
    font-weight: 500;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-card__title a {
    color: var(--color-g-gray-900);
    text-decoration: none;
}

.product-card__title a:hover {
    color: var(--color-google-blue);
}

.product-card__price {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-g-gray-900);
    margin-bottom: 12px;
}

.product-card__price del {
    color: var(--color-g-gray-600);
    font-weight: 400;
    margin-right: 8px;
}

.product-card__price ins {
    text-decoration: none;
    color: var(--color-google-red);
}

.product-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background-color: var(--color-google-blue);
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: auto;
    text-decoration: none;
}

.product-card__button:hover {
    background-color: #1557b0;
    color: #ffffff;
}

.product-card__button.loading {
    opacity: 0.7;
    pointer-events: none;
}

.product-card__button.added {
    background-color: var(--color-google-green);
}

/* ===== Products Grid ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.products-grid--featured {
    grid-template-columns: repeat(4, 1fr);
}

.products-grid--new {
    grid-template-columns: repeat(4, 1fr);
}

.products-grid--archive {
    grid-template-columns: repeat(3, 1fr);
}

/* ===== Shop Header ===== */
.shop-header {
    padding: 32px 0;
    background: linear-gradient(180deg, var(--color-g-gray-50) 0%, #ffffff 100%);
    border-bottom: 1px solid var(--color-g-gray-150);
}

.shop-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.shop-header__title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.shop-header__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* ===== Shop Sidebar ===== */
.shop-sidebar {
    width: 280px;
    flex-shrink: 0;
}

.site-content--shop {
    display: flex;
    gap: 32px;
}

.site-content--shop .content-area {
    flex: 1;
    min-width: 0;
}

/* ===== WooCommerce Breadcrumb ===== */
.woocommerce-breadcrumb {
    font-size: 0.875rem;
    color: var(--color-g-gray-600);
    margin-bottom: 16px;
}

.woocommerce-breadcrumb a {
    color: var(--color-g-gray-600);
}

.woocommerce-breadcrumb a:hover {
    color: var(--color-google-blue);
}

.breadcrumb-separator {
    margin: 0 8px;
    color: var(--color-g-gray-300);
}

/* ===== WooCommerce Notices ===== */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: 16px;
    margin-bottom: 24px;
    border-radius: 4px;
    font-size: 0.875rem;
}

.woocommerce-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.woocommerce-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.woocommerce-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* ===== WooCommerce Pagination ===== */
.woocommerce-pagination {
    margin-top: 40px;
    text-align: center;
}

.woocommerce-pagination ul {
    display: inline-flex;
    list-style: none;
    gap: 4px;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--color-g-gray-200);
    border-radius: 4px;
    font-size: 0.875rem;
    color: var(--color-g-gray-700);
    transition: all 0.2s ease;
}

.woocommerce-pagination ul li a:hover {
    background-color: var(--color-g-gray-50);
    color: var(--color-g-gray-900);
}

.woocommerce-pagination ul li span.current {
    background-color: var(--color-google-blue);
    border-color: var(--color-google-blue);
    color: #ffffff;
}

/* ===== Single Product ===== */
.product-summary {
    padding: 24px 0;
}

.product-summary .product_title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.product-summary .price {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-g-gray-900);
    margin-bottom: 24px;
}

.product-summary .price del {
    color: var(--color-g-gray-600);
    font-weight: 400;
    margin-right: 12px;
}

.product-summary .price ins {
    text-decoration: none;
    color: var(--color-google-red);
}

.product-summary .woocommerce-product-details__short-description {
    margin-bottom: 24px;
    color: var(--color-g-gray-700);
}

/* ===== Quantity Buttons ===== */
.quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-g-gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.quantity input.qty {
    width: 50px;
    height: 44px;
    text-align: center;
    border: none;
    font-size: 1rem;
    -moz-appearance: textfield;
}

.quantity input.qty::-webkit-outer-spin-button,
.quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--color-g-gray-50);
    border: none;
    font-size: 1.25rem;
    color: var(--color-g-gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
}

.qty-btn:hover {
    background: var(--color-g-gray-100);
}

/* ===== Add to Cart Button ===== */
.single_add_to_cart_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    background-color: var(--color-google-blue);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.single_add_to_cart_button:hover {
    background-color: #1557b0;
}

.single_add_to_cart_button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== Product Meta ===== */
.product-meta {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--color-g-gray-150);
}

.product-meta > span {
    display: block;
    font-size: 0.875rem;
    color: var(--color-g-gray-600);
    margin-bottom: 8px;
}

.product-meta a {
    color: var(--color-google-blue);
}

/* ===== Product Tabs ===== */
.woocommerce-tabs {
    margin-top: 48px;
}

.woocommerce-tabs ul.tabs {
    display: flex;
    list-style: none;
    border-bottom: 1px solid var(--color-g-gray-200);
    margin-bottom: 24px;
}

.woocommerce-tabs ul.tabs li {
    margin-right: 24px;
}

.woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 12px 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-g-gray-600);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.2s ease;
}

.woocommerce-tabs ul.tabs li.active a,
.woocommerce-tabs ul.tabs li a:hover {
    color: var(--color-google-blue);
    border-bottom-color: var(--color-google-blue);
}

/* ===== Cart Page ===== */
.cart-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.woocommerce-cart-form {
    margin-bottom: 32px;
}

.woocommerce-cart-form table {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce-cart-form th,
.woocommerce-cart-form td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-g-gray-150);
}

.woocommerce-cart-form th {
    font-weight: 600;
    color: var(--color-g-gray-700);
}

.cart-collaterals {
    background: var(--color-g-gray-50);
    padding: 24px;
    border-radius: 8px;
}

.cart-collaterals h2 {
    font-size: 1.25rem;
    margin-bottom: 16px;
}

/* ===== Checkout Page ===== */
.checkout-wrapper {
    max-width: 1000px;
    margin: 0 auto;
}

.woocommerce-checkout h3 {
    font-size: 1.25rem;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--color-g-gray-150);
}

.woocommerce-billing-fields,
.woocommerce-shipping-fields,
.woocommerce-additional-fields {
    margin-bottom: 32px;
}

.woocommerce form .form-row {
    margin-bottom: 16px;
}

.woocommerce form .form-row label {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-g-gray-200);
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9375rem;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    outline: none;
    border-color: var(--color-google-blue);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

/* ===== My Account ===== */
.woocommerce-MyAccount-navigation {
    width: 200px;
    flex-shrink: 0;
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    border: 1px solid var(--color-g-gray-150);
    border-radius: 8px;
    overflow: hidden;
}

.woocommerce-MyAccount-navigation-link a {
    display: block;
    padding: 12px 16px;
    font-size: 0.875rem;
    color: var(--color-g-gray-700);
    border-bottom: 1px solid var(--color-g-gray-150);
    transition: all 0.2s ease;
}

.woocommerce-MyAccount-navigation-link:last-child a {
    border-bottom: none;
}

.woocommerce-MyAccount-navigation-link.is-active a,
.woocommerce-MyAccount-navigation-link a:hover {
    background: var(--color-g-gray-50);
    color: var(--color-google-blue);
}

.woocommerce-MyAccount-content {
    flex: 1;
    min-width: 0;
}

/* ===== Cart Message ===== */
.cart-message {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 24px;
    background: var(--color-g-gray-900);
    color: #ffffff;
    border-radius: 4px;
    font-size: 0.875rem;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.cart-message.show {
    opacity: 1;
    transform: translateY(0);
}

.cart-message--success {
    background: var(--color-google-green);
}

.cart-message--error {
    background: var(--color-google-red);
}

/* ===== Quick View Modal ===== */
.quick-view-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-view-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.quick-view-content {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
}

.quick-view-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-g-gray-100);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 2;
}

.quick-view-body {
    padding: 32px;
}

body.quick-view-open {
    overflow: hidden;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .products-grid--featured,
    .products-grid--new {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .site-content--shop {
        flex-direction: column;
    }
    
    .shop-sidebar {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .products-grid,
    .products-grid--featured,
    .products-grid--new,
    .products-grid--archive {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .shop-header__inner {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .woocommerce-tabs ul.tabs {
        flex-direction: column;
    }
    
    .woocommerce-tabs ul.tabs li {
        margin-right: 0;
    }
}

@media (max-width: 480px) {
    .products-grid,
    .products-grid--featured,
    .products-grid--new,
    .products-grid--archive {
        grid-template-columns: 1fr;
    }
}