/**
 * Tabish Khan Custom Theme - WooCommerce Styles
 * Grounded in the design aesthetic of Music/public_html
 */

:root {
    --brand-navy: #102a43;
    --brand-navy-hover: #183b5b;
    --brand-muted: #52677f;
    --brand-border: #e3e9ef;
    --brand-soft: #f6f8fb;
}

/* Page wrapper spacing for floating header */
.woocommerce-page-wrapper,
.tk-woocommerce-main {
    padding-top: 1.5rem;
    padding-bottom: 4rem;
}

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

ul.products::before,
ul.products::after {
    display: none !important;
}

/* Product Card - Matching .service-card from template */
ul.products li.product {
    background: #ffffff !important;
    border-radius: 0.75rem !important;
    border: 1px solid var(--brand-border) !important;
    padding: 1.75rem !important;
    display: flex !important;
    flex-direction: column !important;
    position: relative !important;
    transition: all 0.25s ease !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
    margin: 0 !important;
    width: auto !important;
    float: none !important;
}

ul.products li.product:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 10px 15px -3px rgba(16, 42, 67, 0.1), 0 4px 6px -4px rgba(16, 42, 67, 0.1) !important;
    border-color: #cbd5e1 !important;
}

ul.products li.product .woocommerce-loop-product__link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    flex: 1;
}

ul.products li.product img {
    border-radius: 0.5rem;
    object-fit: cover;
    width: 100%;
    aspect-ratio: 4 / 3;
    margin-bottom: 1.25rem !important;
    background: var(--brand-soft);
}

.woocommerce-loop-product__title {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: var(--brand-navy) !important;
    margin-bottom: 0.75rem !important;
    line-height: 1.3 !important;
}

/* On-Sale Badge */
span.onsale {
    position: absolute !important;
    top: 1.5rem !important;
    left: 1.5rem !important;
    background: var(--brand-navy) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    padding: 0.25rem 0.65rem !important;
    border-radius: 0.35rem !important;
    min-height: auto !important;
    min-width: auto !important;
    line-height: 1.2 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

/* Pricing */
.price {
    font-size: 1.25rem !important;
    font-weight: 800 !important;
    color: var(--brand-navy) !important;
    margin-top: auto !important;
    margin-bottom: 1rem !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.price del {
    color: var(--brand-muted) !important;
    font-weight: 500 !important;
    font-size: 0.95rem !important;
}

/* Add to Cart Button */
ul.products li.product .button {
    background: var(--brand-navy) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-radius: 0.5rem !important;
    padding: 0.75rem 1.25rem !important;
    text-align: center !important;
    transition: all 0.2s ease !important;
    border: none !important;
    width: 100% !important;
    margin-top: 0.5rem !important;
}

ul.products li.product .button:hover {
    background: var(--brand-navy-hover) !important;
    transform: scale(1.02);
}

/* Single Product Detail Page */
div.product {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 3rem !important;
    background: #ffffff;
    padding: 2.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--brand-border);
    margin-bottom: 3rem;
}

.woocommerce-product-gallery {
    width: 100% !important;
    float: none !important;
}

.woocommerce-product-gallery img {
    border-radius: 0.5rem;
    border: 1px solid var(--brand-border);
}

.summary.entry-summary {
    width: 100% !important;
    float: none !important;
}

.product_title.entry-title {
    font-size: 2.25rem !important;
    font-weight: 800 !important;
    color: var(--brand-navy) !important;
    margin-bottom: 0.75rem !important;
}

.woocommerce-product-details__short-description {
    font-size: 1rem;
    color: var(--brand-muted);
    margin: 1.5rem 0;
    line-height: 1.7;
}

/* Single Add to Cart Form */
form.cart {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    margin: 2rem 0 !important;
}

.quantity .qty {
    padding: 0.75rem 1rem;
    border: 1px solid var(--brand-border);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    width: 72px;
    text-align: center;
}

.single_add_to_cart_button.button {
    background: var(--brand-navy) !important;
    color: #ffffff !important;
    padding: 0.85rem 2rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border-radius: 0.5rem !important;
    transition: all 0.2s ease !important;
    border: none !important;
}

.single_add_to_cart_button.button:hover {
    background: var(--brand-navy-hover) !important;
}

/* Responsive */
@media (max-width: 1024px) {
    ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 640px) {
    ul.products {
        grid-template-columns: 1fr !important;
    }
    div.product {
        grid-template-columns: 1fr !important;
        padding: 1.25rem;
    }
}
