/**
 * Artisan Theme for Wood Website
 * clean, white, serif-based aesthetic.
 */

:root {
    /* Artisan Variables */
    --card-bg: #ffffff;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --card-shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.1);
    --text-main: #2c2c2c;
    --text-light: #666;
    --accent-color: #a16b3d;
    --border-light: #e6e6e6;

    /* Fonts */
    --font-serif: "Playfair Display", serif;
    --font-sans: "Poppins", sans-serif;
}

/* =========================================
   Global & Utility
   ========================================= */
body {
    background-color: #faf9f6;
    /* Off-white background */
    background-image: none;
    /* Removing wood texture for cleaner look, or keep subtle if preferred */
    font-family: var(--font-sans);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-serif);
    font-weight: 600;
}

/* =========================================
   Artisan Product Cards
   ========================================= */

.product__items {
    background: var(--card-bg);
    border: none;
    border-radius: 0;
    /* Square corners for artisan look, or slight radius? Let's go slight. */
    box-shadow: var(--card-shadow);
    transition: all 0.4s ease;
    padding: 0;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

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

/* Image Container */
.product__items--thumbnail {
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}

.product__items--link {
    display: block;
    width: 100%;
}

.product__items--img {
    width: 100%;
    height: 300px;
    /* Fixed height for consistency */
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product__items:hover .product__items--img {
    transform: scale(1.05);
}

/* Category Tag */
.product-category-tag {
    position: absolute;
    top: 300px;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 8px 20px;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-light);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.product__items:hover .product-category-tag {
    background: var(--accent-color);
    color: #fff;
}

/* Content Area */
.product__items--content {
    padding: 30px 20px 20px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Title */
.product__items--content__title {
    margin-bottom: 10px;
    font-size: 1.25rem;
}

.product__items--content__title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

.product__items--content__title a:hover {
    color: var(--accent-color);
}

/* Description */
.product-short-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Price */
.product__items--price {
    margin-bottom: 20px;
    margin-top: auto;
}

.current__price {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: var(--accent-color);
    font-weight: 700;
}

.old__price {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-right: 10px;
    color: #999;
}

/* Add to Cart Button */
.product-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 0;
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    margin-top: 10px;
    cursor: pointer;
}

.product-card-btn svg {
    margin-right: 8px;
    fill: currentColor;
    width: 14px;
    height: 14px;
}

.product-card-btn:hover {
    background: var(--text-main);
    color: #fff;
    border-color: var(--text-main);
}

/* Badges */
.product__badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.product__badge--items {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.product__badge--items.sale {
    background: #000;
}

.product__badge--items.discount {
    background: var(--accent-color);
}

/* =========================================
   Premium Product Card Component (NEW)
   ========================================= */

.product-card-premium {
    position: relative;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.product-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.product-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #f9f9f9;
}

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

.product-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.2, 1, 0.3, 1);
}

.secondary-image {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition:
        opacity 0.5s ease,
        transform 1.2s cubic-bezier(0.2, 1, 0.3, 1) !important;
}

/* Hover effects for images */
.product-card-premium:hover .primary-image {
    transform: scale(1.1);
    opacity: 0.8;
}

/* Badges */
.product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 5;
}

.badge-item {
    padding: 4px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    color: #fff;
    letter-spacing: 0.5px;
}

.badge-new {
    background: #000;
}

.badge-discount {
    background: var(--accent-color);
}

/* Action Buttons Overlay */
.product-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    display: flex;
    gap: 15px;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.product-card-premium:hover .product-actions {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.action-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.action-btn:hover {
    background: var(--accent-color);
    color: #fff;
    transform: translateY(-3px);
}

/* Content */
.product-card-content {
    padding: 15px 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.product-category {
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: 5px;
    font-weight: 700;
}

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

.product-title {
    font-size: 1.7rem;
    margin-bottom: 8px;
    line-height: 1.3;
    font-family: var(--font-serif);
}

.product-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

.product-title a:hover {
    color: var(--accent-color);
}

.product-description-short {
    font-size: 1.2rem;
    color: #777;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.product-card-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.product-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
}

.price-current {
    font-size: 1.8rem;
    font-weight: 700;
    /* color: var(--accent-color); */
    /* font-family: var(--font-serif); */
}

.price-old {
    font-size: 1.5rem;
    color: #bbb;
    text-decoration: line-through;
    /* font-family: var(--font-serif); */
}

/* Add to Cart Premium */
.add-to-cart-premium-btn {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #000;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #000;
    transition: all 0.3s ease;
    cursor: pointer;
}

.add-to-cart-premium-btn:hover {
    background: var(--accent-color);
    color: #fff;
    border: none;
}

/* List View Variations */
.product-card-list {
    max-height: 400px;
}

.product-card-list .product-card-inner {
    flex-direction: row;
}

.product-card-list .product-card-thumbnail {
    width: 350px;
    min-width: 350px;
    aspect-ratio: auto;
}

.product-card-list .product-card-content {
    padding: 40px;
}

/* Top Rated sidebar compact cards */
.top-rated-list {
    display: flex;
    flex-direction: column;
}

.top-rated-list .top-rated-item {
    margin-bottom: 12px;
}

.top-rated-list .top-rated-item:last-child {
    margin-bottom: 0;
}

.top-rated-list .product-card-premium {
    font-size: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.top-rated-list .product-card-inner {
    flex-direction: row;
    align-items: center;
}

.top-rated-list .product-card-thumbnail {
    width: 85px;
    min-width: 85px;
    aspect-ratio: 1 / 1;
    max-height: unset;
    border-radius: 8px 0 0 8px;
}

.top-rated-list .product-card-content {
    padding: 8px 10px;
    overflow: hidden;
}

.top-rated-list .product-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    margin-top: 4px;
}

.top-rated-list .add-to-cart-premium-btn {
    display: none;
}

.top-rated-list .product-category {
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.top-rated-list .product-title {
    font-size: 1.3rem;
    margin-bottom: 4px;
    line-height: 1.3;
}

.top-rated-list .product-description-short {
    display: none;
}

.top-rated-list .price-current {
    font-size: 1.1rem;
}

.top-rated-list .action-btn {
    width: 32px;
    height: 32px;
}

@media (max-width: 991px) {
    .product-card-list .product-card-thumbnail {
        width: 250px;
        min-width: 250px;
    }
}

@media (max-width: 767px) {
    .product-card-list .product-card-inner {
        flex-direction: column;
    }
    .product-card-list .product-card-thumbnail {
        width: 100%;
        min-width: 100%;
        height: 250px;
    }
}
