/* ========================================
   Product Show Page - Focused Styles
   ======================================== */

/* ========================================
   Product Page Layout
   ======================================== */
.product-page {
    position: relative;
    padding-top: 8rem;
}

@media (min-width: 640px) {
    .product-page {
        padding-top: 10rem;
    }
}

.product-page::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 280px;
    background: linear-gradient(180deg, rgba(17, 115, 212, 0.12), rgba(17, 115, 212, 0.04), rgba(249, 250, 251, 0));
    pointer-events: none;
    z-index: 0;
}

.product-section {
    position: relative;
    z-index: 1;
}

/* ========================================
   Product Header
   ======================================== */
.product-header {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
}

.product-header-hero {
    padding: 2.25rem 2rem 2.75rem;
    border-radius: 1.25rem;
    border: 1px solid rgba(17, 115, 212, 0.08);
    overflow: hidden;
}

@media (max-width: 768px) {
    .product-header {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .product-header-hero {
        padding: 1.5rem 1.25rem 2.25rem;
    }
}

/* ========================================
   Product Gallery
   ======================================== */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 520px;
    width: 100%;
}

.product-main-image-container {
    position: relative;
    background: var(--muted);
    border-radius: 0.5rem;
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    max-height: 520px;
    transition: box-shadow 0.2s;
}

.product-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Image Thumbnails */
.product-thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.product-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.product-thumbnails::-webkit-scrollbar-track {
    background: var(--muted);
}

.product-thumbnails::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.product-thumb {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border-radius: 0.375rem;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid var(--border);
    transition: all 0.2s;
    background: var(--muted);
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-thumb:hover,
.product-thumb.active {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

/* ========================================
   Product Info
   ======================================== */
.product-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.product-short-desc {
    font-size: 0.95rem;
    color: var(--muted-fg);
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: .8rem;
    flex-wrap: wrap;
}

.product-sku {
    font-size: 0.75rem;
    color: var(--muted-fg);
    background: var(--muted);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: monospace;
}

.category-badge {
    background: #dbeafe;
    color: var(--primary);
    padding: 0.35rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Price Section */
.product-price-section {
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.price-row:last-child {
    margin-bottom: 0;
}

.price-label {
    min-width: 70px;
    color: var(--muted-fg);
    font-weight: 500;
}

.price-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ef4444;
}

.price-value.contact {
    color: var(--primary);
}

/* ========================================
   Product Variants & Colors
   ======================================== */
.product-variants {
    margin-bottom: 1.5rem;
}

.variant-group {
    margin-bottom: 1rem;
}

.variant-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    display: inline-block;
}

.variant-options {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.5rem;
}

.color-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0.5rem 0.65rem;
    border-radius: 0.3rem;
    border: 2px solid var(--border);
    background: white;
    font-size: 0.85rem;
}

.color-option:hover,
.color-option.active {
    border-color: var(--primary);
    background: #dbeafe;
}

.color-box {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.color-name {
    font-size: 0.875rem;
    color: var(--muted-fg);
    font-weight: 500;
}

.variant-option {
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--border);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-fg);
    background: white;
}

.variant-option:hover {
    border-color: var(--primary);
}

.variant-option.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ========================================
   Action Buttons
   ======================================== */
.product-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
}

.product-actions-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 640px) {
    .product-actions-split {
        grid-template-columns: 1fr;
    }
}

.btn-action {
    padding: 0.9rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    text-decoration: none;
    text-align: left;
}

.btn-icon {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.btn-label {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.btn-sub {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.85;
}

.btn-action.primary {
    background: linear-gradient(135deg, rgba(17, 115, 212, 0.12), rgba(17, 115, 212, 0.08));
    color: var(--primary);
    border-color: rgba(17, 115, 212, 0.35);
}

.btn-action.primary:hover {
    background: linear-gradient(135deg, var(--primary), #0d5fa8);
    color: white;
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.btn-action.secondary {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.08));
    color: #10b981;
    border: 2px solid rgba(16, 185, 129, 0.35);
}

.btn-action.secondary:hover {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-action.zalo {
    background: linear-gradient(135deg, rgba(0, 132, 255, 0.12), rgba(0, 132, 255, 0.08));
    color: #0084ff;
    border-color: rgba(0, 132, 255, 0.35);
}

.btn-action.zalo:hover {
    background: linear-gradient(135deg, #0084ff, #0066cc);
    color: white;
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

/* Share Buttons */
.product-share {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-start;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    width: 100%;
}

.share-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-fg);
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--muted-fg);
    font-size: 0.95rem;
}

.share-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ========================================
   Product Specs Visual
   ======================================== */
.product-detail-info {
    margin-bottom: .8rem;
    padding: 0;
    border-radius: 0;
    border: none;
    background: transparent;
}

.product-detail-info-title {
    display: none;
}

.product-detail-info-horizontal {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    width: 100%;
}

@media (max-width: 1024px) {
    .product-detail-info-horizontal {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .product-detail-info-horizontal {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.product-detail-info-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    background: white;
    transition: all 0.2s;
    animation: fadeUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    opacity: 0;
    overflow: hidden;
}

.product-detail-info-row:nth-child(1) {
    animation-delay: 0.1s;
}

.product-detail-info-row:nth-child(2) {
    animation-delay: 0.2s;
}

.product-detail-info-row:nth-child(3) {
    animation-delay: 0.3s;
}

.product-detail-info-row:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(17, 115, 212, 0.15);
    transform: translateY(-2px);
}

.product-detail-info-icon {
    width: 60px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--muted);
    border-radius: 0.4rem;
    border: 1px solid var(--border);
    overflow: hidden;
}

.product-detail-info-icon img {
    height: 100%;
    object-fit: cover;
}

.product-detail-info-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.product-detail-info-value {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.1;
    word-break: break-word;
}

.product-detail-info-label {
    font-size: 0.75rem;
    color: var(--muted-fg);
    font-weight: 500;
    line-height: 1;
}

.basic-specs {
    display: none;
}

/* ========================================
   Specifications Table
   ======================================== */
.product-specs-section {
    margin-bottom: 3rem;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: rgba(249, 250, 251, 0.8);
}

.specs-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.specs-table-wrapper {
    overflow-x: auto;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: none;
    font-size: 0.9rem;
}

.specs-table thead {
    background: rgba(17, 115, 212, 0.12);
}

.specs-table th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(17, 115, 212, 0.2);
}

.specs-header-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.specs-header-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    opacity: 0.9;
    display: inline-block;
    flex-shrink: 0;
}

.specs-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--muted-fg);
}

.specs-table tbody tr {
    cursor: pointer;
    transition: background 0.2s;
}

.specs-table tbody tr:hover {
    background: var(--muted);
}

.specs-table tbody tr.active {
    background: #dbeafe5d;
}

.specs-product-name {
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
}

.specs-product-name:hover {
    text-decoration: underline;
}

/* ========================================
   Product Description
   ======================================== */
.product-description-section {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--border);
}

.description-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.description-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--muted-fg);
}

.description-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
    box-shadow: var(--shadow);
}

.description-content p {
    margin-bottom: 0.75rem;
}

/* ========================================
   Related Products
   ======================================== */
.related-section {
    margin-bottom: 2rem;
}

.related-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.related-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}

@media (max-width: 1024px) {
    .related-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 640px) {
    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.related-product-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.related-product-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.related-product-image {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.related-product-card:hover .related-product-image img {
    transform: scale(1.05);
}

.related-product-info {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-product-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 1rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.related-product-specs {
    font-size: 0.85rem;
    color: var(--muted-fg);
    display: grid;
    gap: 0.25rem;
}

.related-product-sku {
    font-size: 0.85rem;
    color: var(--muted-fg);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .product-title {
        font-size: 1.7rem;
    }

    .product-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .product-share {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .share-btn {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .product-title {
        font-size: 1.25rem;
    }

    .btn-action {
        padding: 0.85rem 1rem;
        font-size: 0.9rem;
        gap: 0.6rem;
    }

    .specs-table {
        font-size: 0.875rem;
    }

    .specs-table th,
    .specs-table td {
        padding: 0.75rem;
    }
}

.placeholder-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--muted);
    color: var(--border);
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.placeholder-image i {
    font-size: 2rem;
}