/* ==========================================================
   GyutoGuru Hybrid Commerce — Frontend Styles
   Design tokens from --tin system (dark theme)
   ========================================================== */

/* ── Spec Table ─────────────────────────────────────────── */
.gyg-spec-table-wrap {
    margin: 2rem 0;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 6px;
    overflow: hidden;
    background: #1a1917; /* slightly lighter than --ink */
}

.gyg-spec-title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #b8a98a; /* warm gold */
    padding: 12px 16px;
    margin: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
}

.gyg-specs {
    width: 100%;
    border-collapse: collapse;
}

.gyg-specs tr {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.gyg-specs tr:last-child {
    border-bottom: none;
}

.gyg-specs th {
    padding: 10px 16px;
    text-align: left;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.5); /* --tin-500 */
    width: 45%;
    background: transparent;
}

.gyg-specs td {
    padding: 10px 16px;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.85); /* --tin-900 */
    background: transparent;
}

/* ── Also on Amazon CTA ─────────────────────────────────── */
.gyg-also-on-amazon {
    margin: 1rem 0;
    padding: 14px 16px;
    border: 1px solid rgba(255,170,0,0.25); /* --tin-300 amber */
    border-radius: 6px;
    background: rgba(255,170,0,0.04);
}

.gyg-amazon-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    color: #ff9900 !important;
    border: 1px solid #ff9900;
    border-radius: 4px;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-decoration: none !important;
    transition: background 0.2s ease, color 0.2s ease;
}

.gyg-amazon-btn:hover {
    background: #ff9900;
    color: #000 !important;
}

.gyg-amazon-icon {
    font-style: normal;
}

/* ── Affiliate Disclosure ────────────────────────────────── */
.gyg-affiliate-disclosure {
    margin: 8px 0 0;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.3);
    font-style: italic;
    line-height: 1.4;
}

/* ── Affiliate Badge on Product Cards ───────────────────── */
.gyg-affiliate-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    padding: 3px 8px;
    background: rgba(0,0,0,0.75);
    color: #ff9900;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid rgba(255,153,0,0.4); /* --tin-300 */
    border-radius: 3px;
    backdrop-filter: blur(4px);
}

/* Ensure product thumbnail wrapper is positioned */
.woocommerce ul.products li.product .woocommerce-loop-product__link,
.woocommerce ul.products li.product a.woocommerce-loop-product__link {
    position: relative;
    display: block;
}

/* ── Category Grid — WooCommerce Loop ───────────────────── */
.woocommerce ul.products li.product {
    background: var(--tin-100, #1c1b18);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.woocommerce ul.products li.product:hover {
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

/* Product image aspect ratio 4:3 */
.woocommerce ul.products li.product .woocommerce-loop-product__link img,
.woocommerce ul.products li.product img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
    display: block;
}

/* Product name */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--tin-900, rgba(255,255,255,0.9));
    padding: 12px 14px 4px;
    margin: 0;
}

/* Price */
.woocommerce ul.products li.product .price {
    color: var(--tin-500, rgba(255,255,255,0.5));
    font-size: 0.85rem;
    padding: 0 14px 8px;
    display: block;
}

/* Add to Cart / View on Amazon buttons in loop */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product a.button {
    margin: 0 14px 14px;
    width: calc(100% - 28px);
    text-align: center;
    background: var(--accent, #c8922a);
    color: var(--white, #fff) !important;
    border: none;
    border-radius: 4px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 10px;
    text-decoration: none !important;
    transition: background 0.2s ease;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product a.button:hover {
    background: var(--accent-dark, #a87622);
    color: var(--white, #fff) !important;
}

/* External/affiliate product button — Amazon styling */
.woocommerce ul.products li.product.product-type-external .button,
.woocommerce ul.products li.product.product-type-external a.button {
    background: transparent;
    color: #ff9900 !important;
    border: 1px solid #ff9900;
}

.woocommerce ul.products li.product.product-type-external .button:hover,
.woocommerce ul.products li.product.product-type-external a.button:hover {
    background: #ff9900;
    color: #000 !important;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .gyg-spec-table-wrap {
        margin: 1.5rem 0;
    }
    .gyg-specs th,
    .gyg-specs td {
        padding: 8px 12px;
    }
    .gyg-affiliate-badge {
        top: 6px;
        right: 6px;
    }
}

@media (max-width: 375px) {
    .gyg-specs th {
        width: 40%;
    }
    .gyg-amazon-btn {
        width: 100%;
        justify-content: center;
    }
}
