/* SEO-Optimized Product Page Styles */
.product-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
}

@media (min-width: 768px) {
    .product-layout {
        grid-template-columns: 2fr 1fr;
        gap: 3rem;
    }
}

/* Product Info Section */
.product-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .product-info {
        flex-direction: row;
        gap: 2rem;
    }
}

.product-image {
    flex: 0 0 300px;
    text-align: center;
}

.product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-details {
    flex: 1;
    min-width: 0;
}

.site-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    width: fit-content;
    margin-bottom: 1rem;
}

.site-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.product-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .product-title {
        font-size: 2rem;
    }
}

/* Price Section */
.price-section {
    margin-bottom: 2rem;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .current-price {
        font-size: 2.5rem;
    }
}

.price-details {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.discount-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: #dcfce7;
    color: #16a34a;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

.original-price {
    text-decoration: line-through;
    color: #64748b;
    font-size: 1.125rem;
}

/* Deal Scanner */
.deal-scanner {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.deal-header {
    background: #e0e7ff;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deal-header h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.share-buttons a {
    color: #4f46e5;
    text-decoration: none;
}

.deal-content {
    padding: 1.5rem;
}

.deal-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #dcfce7;
    color: #16a34a;
    padding: 0.75rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    width: fit-content;
    margin-bottom: 1.5rem;
}

.deal-meter {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.speedometer {
    position: relative;
    width: 120px;
    height: 60px;
    background: conic-gradient(from 180deg, #ef4444 0deg, #f97316 72deg, #eab308 144deg, #22c55e 180deg);
    border-radius: 120px 120px 0 0;
    overflow: hidden;
}

.speedometer::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px;
    height: 40px;
    background: white;
    border-radius: 80px 80px 0 0;
    transform: translate(-50%, -50%);
}

.needle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 50px;
    background: #1e293b;
    transform-origin: bottom center;
    z-index: 10;
}

.deal-score {
    font-size: 0.875rem;
    color: #64748b;
}

.deal-score strong {
    color: #1e293b;
    font-size: 1.125rem;
}

.lowest-badge {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.lowest-badge .material-icons {
    color: #16a34a;
    font-size: 1.5rem;
}

.lowest-badge h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.25rem 0;
}

.lowest-badge p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

/* Score Breakdown */
.score-breakdown {
    background: #f1f5f9;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.score-breakdown h5 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1rem 0;
}

.score-items {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.score-item span {
    color: #64748b;
}

.score-circle {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid #e2e8f0;
    position: relative;
}

.score-circle::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #22c55e;
    transform: rotate(calc(var(--score, 0) * 3.6deg));
}

/* Price Stats */
.price-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.stat-item {
    background: white;
    padding: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-item .material-icons {
    font-size: 1.25rem;
}

.stat-item .material-icons.red { color: #ef4444; }
.stat-item .material-icons.orange { color: #f97316; }
.stat-item .material-icons.green { color: #22c55e; }

.stat-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.stat-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

/* Price Alert Section */
.price-alert-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.price-alert-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1rem 0;
    text-align: center;
}

.alert-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.input-group {
    display: flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.75rem;
    gap: 0.5rem;
}

.input-group .material-icons {
    color: #9ca3af;
    font-size: 1.25rem;
}

.input-group input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    font-weight: 500;
}

.btn-primary {
    background: #4f46e5;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background: #4338ca;
}

.buy-button {
    text-decoration: none;
}

.btn-buy {
    width: 100%;
    background: #f97316;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 1rem;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-buy:hover {
    background: #ea580c;
}

/* Chart Section */
.chart-section {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
}

.chart-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 1.5rem 0;
    text-align: center;
}

.chart-container {
    position: relative;
    height: 300px;
    margin-bottom: 1rem;
}

.chart-controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.chart-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.chart-btn:hover,
.chart-btn.active {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
}

/* Breadcrumb */
.breadcrumb {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.75rem 0;
}

.breadcrumb .container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: #4f46e5;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: #64748b;
}

/* Responsive Design */
@media (max-width: 767px) {
    .product-layout {
        padding: 1rem 0.5rem;
    }
    
    .product-image {
        flex: none;
    }
    
    .current-price {
        font-size: 1.75rem;
    }
    
    .price-stats {
        grid-template-columns: 1fr;
        gap: 1px;
    }
    
    .deal-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .chart-container {
        height: 250px;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states */
button:focus,
input:focus,
a:focus {
    outline: 2px solid #4f46e5;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .deal-scanner,
    .price-alert-section,
    .chart-section {
        border-width: 2px;
    }
    
    .btn-primary,
    .btn-buy {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .skeleton {
        animation: none;
    }
    
    .needle {
        transition: none;
    }
}