/* =====================================================
   product_detail.css — DukaSmart Marketplace · Premium Upgrade
   ===================================================== */


/* =====================================================
   BASE CARD SETUP
   card-label is the section eyebrow (small label above heading)
   ===================================================== */
.card {
    border-radius: var(--radius-lg);
    background: var(--surface-card);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand-green);
    background: var(--brand-green-ghost);
    border: 1px solid rgba(var(--brand-green-rgb, 22, 163, 74), 0.18);
    border-radius: 999px;
    padding: 4px 12px;
    margin-bottom: 18px;
}

.card-label.small {
    font-size: 0.65rem;
    padding: 3px 9px;
    margin-bottom: 12px;
}


/* =====================================================
   PRODUCT OVERVIEW CARD
   ===================================================== */
.product-overview {
    padding: 28px;
}

/* 3-column grid: image | info | shop */
.product-top {
    display: grid;
    grid-template-columns: 1.15fr 1fr 0.85fr;
    gap: 20px;
    align-items: start;
}

/* Shared panel base */
.product-image,
.product-info-main,
.shop-card {
    background: var(--surface-soft);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px;
    height: 100%;
}


/* =====================================================
   IMAGE PANEL
   ===================================================== */
.product-image {
    padding: 12px;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 340px;
    object-fit: cover;
    border-radius: calc(var(--radius-md) - 4px);
    display: block;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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


/* =====================================================
   PRODUCT INFO PANEL
   ===================================================== */
.product-info-main {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    position: relative;
}

/* Category eyebrow */
.product-category {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Product name */
.product-info-main h1 {
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.3px;
    color: var(--text-primary, #0f172a);
    margin-bottom: 14px;
}

/* Price — prominent */
.product-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--brand-green);
    letter-spacing: -0.5px;
    margin-bottom: 16px;
    line-height: 1;
    position: relative;
    display: inline-block;
}

/* Subtle underline on price */
.product-price::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-green), transparent);
    border-radius: 999px;
    opacity: 0.45;
}

/* Tags / badges */
.product-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 18px 0 16px;
}

.product-tags span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--brand-green-ghost);
    color: var(--brand-green-dark);
    border: 1px solid rgba(var(--brand-green-rgb, 22, 163, 74), 0.2);
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: background 0.18s ease, transform 0.18s ease;
}

.product-tags span:hover {
    background: var(--brand-green);
    color: #fff;
    border-color: var(--brand-green);
    transform: translateY(-1px);
}

/* Description */
.product-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.72;
    margin-top: 4px;
    border-top: 1px solid var(--border);
    padding-top: 14px;
}


/* =====================================================
   SHOP SIDEBAR CARD
   ===================================================== */
.shop-card {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    overflow: hidden;
}

/* Subtle top accent stripe */
.shop-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2.5px;
    background: linear-gradient(90deg, var(--brand-green), var(--brand-green-dark, #15803d));
    border-radius: 0 0 999px 999px;
}

/* Seller logo + name */
.shop-header {
    display: flex;
    gap: 13px;
    align-items: center;
    margin-bottom: 14px;
}

.shop-header img {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    border: 1.5px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.shop-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary, #0f172a);
    margin-bottom: 2px;
    line-height: 1.2;
}

.shop-header p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Trust badges */
.shop-meta {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 13px 0;
    margin-bottom: 14px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.shop-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Green dot prefix for trust signals */
.shop-meta span::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-green);
    flex-shrink: 0;
}

/* CTA button — pinned to bottom */
.shop-card .btn-primary {
    margin-top: auto;
    width: 100%;
    text-align: center;
    padding: 12px 16px;
    font-size: 0.84rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 3px 12px rgba(var(--brand-green-rgb, 22, 163, 74), 0.28);
}

.shop-card .btn-primary:hover {
    box-shadow: 0 6px 20px rgba(var(--brand-green-rgb, 22, 163, 74), 0.42);
}


/* =====================================================
   SIMILAR PRODUCTS SECTION
   ===================================================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    padding: 4px 2px;
}

/* Card */
.product-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.06);
    border-color: var(--brand-green);
}

/* Image */
.product-card img {
    width: 100%;
    height: 155px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-card:hover img {
    transform: scale(1.07);
}

/* Text content area */
.product-card h4 {
    font-size: 0.825rem;
    font-weight: 600;
    color: var(--text-primary, #0f172a);
    line-height: 1.35;
    padding: 11px 12px 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card p {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--brand-green);
    padding: 0 12px 13px;
    margin-top: auto;
    letter-spacing: -0.1px;
}

/* Empty state */
.product-grid:empty::after {
    content: "No similar products available yet.";
    display: block;
    grid-column: 1 / -1;
    text-align: center;
    padding: 44px 24px;
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.875rem;
    background: var(--surface-soft);
}


/* =====================================================
   CATEGORIES SECTION
   ===================================================== */
.category-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 2px;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 15px;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1.5px solid var(--border);
    font-size: 0.78rem;
    font-weight: 500;
    text-decoration: none;
    color: var(--text-secondary);
    letter-spacing: 0.01em;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.category-chip:hover {
    background: var(--brand-green);
    color: #ffffff;
    border-color: var(--brand-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(var(--brand-green-rgb, 22, 163, 74), 0.3);
}


/* =====================================================
   SHARED CARD CONTENT PADDING
   ===================================================== */
.card > .product-grid,
.card > .category-row {
    padding: 20px 24px 24px;
}

.card > .card-label {
    margin: 24px 24px 0;
}


/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 1200px) {
    .product-top {
        grid-template-columns: 1.1fr 1fr;
    }

    /* Shop card drops to full-width below the two columns */
    .shop-card {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 20px;
    }

    .shop-card .card-label {
        width: 100%;
        margin-bottom: 0;
    }

    .shop-header {
        flex: 1;
        min-width: 180px;
        margin-bottom: 0;
    }

    .shop-meta {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        border: none;
        padding: 0;
        margin: 0;
        align-self: center;
    }

    .shop-card .btn-primary {
        align-self: flex-end;
        margin-top: 0;
        min-width: 140px;
        width: auto;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .product-top {
        grid-template-columns: 1fr;
    }

    .product-image img {
        height: 260px;
    }

    .shop-card {
        grid-column: unset;
        flex-direction: column;
    }

    .shop-meta {
        flex-direction: column;
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        padding: 13px 0;
        margin: 0 0 14px;
    }

    .shop-card .btn-primary {
        width: 100%;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-overview {
        padding: 20px;
    }
}

@media (max-width: 540px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-card img {
        height: 130px;
    }

    .product-info-main h1 {
        font-size: 1.3rem;
    }

    .product-price {
        font-size: 1.45rem;
    }

    .card > .product-grid,
    .card > .category-row {
        padding: 16px;
    }

    .card > .card-label {
        margin: 16px 16px 0;
    }

    .product-overview {
        padding: 16px;
    }
}

@media (max-width: 400px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}