/* Good4 Product Page Styles */

/* Base styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: #1f2937;
    background: #f9fafb;
    line-height: 1.5;
}

body .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Breadcrumb */
.breadcrumb {
    padding: 16px 0;
    font-size: 14px;
    color: #6b7280;
}

.breadcrumb a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #2563eb;
}

/* Mobile breadcrumb */
.mobile-breadcrumb {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 16px;
}

.mobile-breadcrumb-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mobile-breadcrumb-wrapper::-webkit-scrollbar {
    display: none;
}

.mobile-breadcrumb-scroll {
    display: flex;
    padding: 12px 16px;
    gap: 8px;
    white-space: nowrap;
}

.mobile-breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
    flex-shrink: 0;
}

.mobile-breadcrumb-item:not(:last-child)::after {
    content: '/';
    margin-left: 8px;
    color: #d1d5db;
}

.mobile-breadcrumb-item.current {
    color: #1f2937;
    font-weight: 500;
}

/* Product container */
.product-container {
    display: grid !important;
    grid-template-columns: 1fr 320px !important;
    gap: 32px !important;
    margin-bottom: 48px;
}

/* Product main section */
body .product-main {
    background: #fff !important;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Product images */
body .product-images {
    margin-bottom: 32px;
}

body .main-image {
    width: 100%;
    max-width: 600px;
    height: 400px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border-radius: 8px;
    overflow: hidden;
}

.main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #d1d5db;
}

.image-thumbnails {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
}

.thumbnail:hover {
    border-color: #2563eb;
}

.thumbnail.active {
    border-color: #2563eb;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product info */
body .product-info h1 {
    font-size: 24px !important;
    font-weight: 600 !important;
    margin: 0 0 16px !important;
    color: #1f2937 !important;
}

.product-brand {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 16px;
}

/* Price section */
body .price-section {
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.price-range {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

body .price-value {
    font-size: 28px !important;
    font-weight: 600 !important;
    color: #1f2937 !important;
}

.price-currency {
    font-size: 18px;
    color: #6b7280;
}

.price-contact {
    font-size: 20px;
    color: #6b7280;
}

.moq {
    display: flex;
    gap: 8px;
    font-size: 16px;
}

.moq-label {
    color: #6b7280;
}

.moq-value {
    font-weight: 500;
    color: #1f2937;
}

/* Quick actions */
.quick-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
}

.btn-primary, .btn-secondary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #2563eb;
    color: white;
    flex: 1;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #fff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    flex: 1;
}

.btn-secondary:hover {
    background: #f9fafb;
}

/* Key features */
.key-features {
    margin-bottom: 32px;
}

.key-features h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.feature-item {
    display: flex;
    gap: 8px;
}

.feature-name {
    color: #6b7280;
}

.feature-value {
    font-weight: 500;
    color: #1f2937;
}

/* Product description */
.product-description h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px;
}

.description-content {
    color: #4b5563;
    line-height: 1.7;
}

/* Sidebar */
body .product-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Supplier card */
body .supplier-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.supplier-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px;
}

.supplier-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.supplier-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
}

.supplier-name {
    flex: 1;
}

.supplier-name a {
    color: #1f2937;
    text-decoration: none;
    font-weight: 500;
}

.supplier-name a:hover {
    color: #2563eb;
}

.supplier-flag {
    font-size: 20px;
    margin-left: 8px;
}

.supplier-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.detail-label {
    color: #6b7280;
}

.detail-value {
    font-weight: 500;
    color: #1f2937;
}

.supplier-actions {
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.btn-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    transition: gap 0.2s;
}

.btn-link:hover {
    gap: 12px;
}

/* Quick contact */
.quick-contact {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.quick-contact h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 20px;
}

.form-group {
    position: relative;
    margin-bottom: 16px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.form-group .unit {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 14px;
}

.full-width {
    width: 100%;
}

/* Trade assurance */
.trade-assurance {
    background: #f0fdf4;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #bbf7d0;
}

.trade-assurance h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #065f46;
}

.trade-assurance ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.trade-assurance li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #047857;
    font-size: 14px;
    margin-bottom: 8px;
}

.trade-assurance li svg {
    color: #10b981;
}

/* Specifications section */
.specifications-section {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 48px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.specifications-section h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 24px;
}

.specifications-table {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.spec-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.spec-name {
    color: #6b7280;
}

.spec-value {
    font-weight: 500;
    color: #1f2937;
}

/* Similar products */
.similar-products {
    margin-bottom: 48px;
}

.similar-products h2 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 24px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.product-card .product-image {
    width: 100%;
    height: 200px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image-small {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #d1d5db;
}

.product-card-info {
    padding: 16px;
}

.product-card-info h4 {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 8px;
    color: #1f2937;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-price {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.product-moq {
    font-size: 12px;
    color: #6b7280;
}

/* Mobile styles */
@media (max-width: 1024px) {
    .product-container {
        grid-template-columns: 1fr;
    }
    
    .specifications-table {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    
    .mobile-only {
        display: block !important;
    }
    
    .product-main {
        padding: 16px;
        border-radius: 0;
        margin: 0 -20px;
    }
    
    .main-image {
        height: 300px;
    }
    
    .quick-actions {
        flex-direction: column;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .product-sidebar {
        margin: 0 -20px;
    }
    
    .supplier-card,
    .quick-contact,
    .trade-assurance {
        border-radius: 0;
    }
    
    .specifications-section {
        border-radius: 0;
        margin: 0 -20px 32px;
        padding: 20px;
    }
}

/* RTL support */
.rtl-content {
    direction: rtl;
}

.rtl-content .breadcrumb {
    text-align: right;
}

.rtl-content .mobile-breadcrumb-scroll {
    direction: rtl;
}

.rtl-content .detail-row {
    flex-direction: row-reverse;
}

.rtl-content .btn-link {
    flex-direction: row-reverse;
}

/* Utility classes */
.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}
