/* ==========================================================================
   Product Detail Page Styles
   ========================================================================== */

/* Reset and Base Styles */
.royal-product-detail {
    padding: 60px 0;
    background-color: #ffffff;
    position: relative;
}

.royal-section-padding {
    padding: 60px 0;
}


/* Breadcrumb Navigation */
.royal-breadcrumb-nav {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.royal-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
}

.royal-breadcrumb-item {
    display: flex;
    align-items: center;
    color: #666;
}

.royal-breadcrumb-item+.royal-breadcrumb-item::before {
    content: "/";
    display: inline-block;
    padding: 0 10px;
    color: #999;
}

.royal-breadcrumb-item a {
    color: #666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.royal-breadcrumb-item a:hover {
    color: #C9A227;
}

.royal-breadcrumb-item.royal-active {
    color: #C9A227;
    font-weight: 600;
}

/* Main Content Layout */
.royal-product-detail-main {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px 0px;
}

.royal-product-gallery,
.royal-product-info {
    padding: 0 15px;
    box-sizing: border-box;
}

/* Gallery Styles */
.royal-main-image {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    background: #f9f9f9;
    border: 1px solid #e6e6e6;
}

.royal-thumb-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
    overflow: hidden;
}

.royal-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.royal-thumb-wrapper:hover .royal-thumb {
    transform: scale(1.05);
}

.royal-thumbnails {
    margin-top: 15px;
}

.royal-thumbnail-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: -5px;
}

.royal-thumbnail-item {
    flex: 0 0 calc(25% - 10px);
    max-width: calc(25% - 10px);
    cursor: pointer;
    border-radius: 5px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.royal-thumbnail-item:hover {
    border-color: #C9A227;
    transform: translateY(-3px);
}

.royal-thumbnail-item.royal-active {
    border-color: #C9A227;
    box-shadow: 0 5px 15px rgba(201, 162, 39, 0.2);
}

.royal-thumbnail-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

/* Product Info Styles */
.royal-product-header {
    margin-bottom: 25px;
}

.royal-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.royal-product-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: #f5f5f5;
    border-radius: 3px;
}

.royal-product-meta i {
    color: #C9A227;
    font-size: 12px;
}

.royal-product-title {
    font-size: 30px;
    font-weight: 700;
    color: #333;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.royal-product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.royal-product-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 3px;
    background: #f5f5f5;
    color: #666;
    transition: all 0.3s ease;
}

.royal-product-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.royal-product-tag i {
    font-size: 10px;
}

.royal-tag-red {
    background: #ffebee;
    color: #d32f2f;
}

.royal-tag-blue {
    background: #e3f2fd;
    color: #1976d2;
}

.royal-tag-green {
    background: #e8f5e9;
    color: #388e3c;
}

.royal-tag-orange {
    background: #fff3e0;
    color: #f57c00;
}

.royal-tag-purple {
    background: #f3e5f5;
    color: #7b1fa2;
}

.royal-product-description {
    font-size: 16px;
    color: #999;
    margin-bottom: 15px;
    padding-bottom: 15px;
}

/* Specifications */
.royal-product-specs {
    margin-bottom: 30px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e6e6e6;
}

.royal-specs-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.royal-specs-title i {
    color: #C9A227;
}

.royal-specs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.royal-spec-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 15px;
    background: white;
    border-radius: 5px;
    border-left: 3px solid #C9A227;
}

.royal-spec-label {
    font-weight: 500;
    color: #333;
}

.royal-spec-value {
    color: #666;
    font-weight: 400;
}

/* Action Buttons */
.royal-product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid #e6e6e6;
}


/* Tab Content */
.royal-product-content {
    margin-top: 30px;
    background: white;
    border-radius: 10px;
    border: 1px solid #e6e6e6;
    overflow: hidden;
}

.royal-content-tabs {
    display: flex;
    background: #f9f9f9;
    border-bottom: 1px solid #e6e6e6;
}

.royal-tab-btn {
    padding: 15px 30px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.royal-tab-btn:hover {
    color: #C9A227;
}

.royal-tab-btn.royal-active {
    color: #C9A227;
}

.royal-tab-btn.royal-active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background: #C9A227;
}

.royal-tab-content {
    display: none;
    padding: 30px;
}

.royal-tab-content.royal-active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Article Body Content */
.royal-article-body {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.royal-article-body h2,
.royal-article-body h3,
.royal-article-body h4 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.royal-article-body h2 {
    font-size: 24px;
}

.royal-article-body h3 {
    font-size: 20px;
}

.royal-article-body h4 {
    font-size: 18px;
}

.royal-article-body p {
    margin-bottom: 20px;
}

.royal-article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 15px 0;
}

.royal-article-body ul,
.royal-article-body ol {
    margin: 15px 0 15px 20px;
    padding-left: 20px;
}

.royal-article-body li {
    margin-bottom: 8px;
}

.royal-article-body blockquote {
    border-left: 4px solid #C9A227;
    padding: 15px 20px;
    margin: 20px 0;
    background: #f9f9f9;
    font-style: italic;
    color: #555;
}

.royal-article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.royal-article-body table th,
.royal-article-body table td {
    padding: 10px 15px;
    border: 1px solid #e6e6e6;
    text-align: left;
}

.royal-article-body table th {
    background: #f9f9f9;
    font-weight: 600;
    color: #333;
}

.royal-article-body table tr:hover {
    background: #f5f5f5;
}

/* Related Products */
.royal-related-products {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #e6e6e6;
}

.royal-text-center {
    text-align: center;
}

.royal-section-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin: 0 0 30px 0;
    position: relative;
    padding-bottom: 15px;
}

.royal-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: #C9A227;
}

.royal-text-center .royal-section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

.royal-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.royal-related-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e6e6e6;
    transition: all 0.3s ease;
}

.royal-related-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: #C9A227;
}

.royal-related-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.royal-related-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.royal-related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.royal-related-item:hover .royal-related-image img {
    transform: scale(1.05);
}

.royal-related-info {
    padding: 20px;
}

.royal-related-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.royal-related-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}


@media (max-width: 768px) {
    .royal-product-detail {
        padding: 15px 0 30px;
    }

    .royal-product-gallery,
    .royal-product-info {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }

    .royal-product-info {
        margin-top: 15px;
    }

    .royal-product-content {
        margin-top: 15px;
    }

    .royal-product-title {
        font-size: 24px;
    }

    .royal-main-image {
        margin: 0;
    }

    .royal-product-actions {
        padding: 30px 0 15px;
    }

    .royal-content-tabs {
        flex-direction: column;
    }

    .royal-tab-btn {
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #e6e6e6;
    }

    .royal-tab-content {
        padding: 20px;
    }

    .royal-related-grid {
        grid-template-columns: 1fr;
    }

    .royal-section-title {
        font-size: 24px;
    }
}

/* Print Styles */
@media print {

    .royal-product-actions,
    .royal-breadcrumb-nav,
    .royal-related-products {
        display: none;
    }

    .royal-product-detail {
        padding: 0;
    }

    .royal-container {
        max-width: 100%;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .royal-btn-primary {
        border: 2px solid #000;
    }

    .royal-spec-item {
        border-left-width: 4px;
    }
}

/* IE Compatibility */
@media all and (-ms-high-contrast: none),
(-ms-high-contrast: active) {

    /* IE10+ specific styles */
    .royal-product-detail-main {
        display: block;
    }

    .royal-product-gallery,
    .royal-product-info {
        float: left;
        width: 50%;
        display: block;
    }

    .royal-thumbnail-list {
        display: block;
        font-size: 0;
    }

    .royal-thumbnail-item {
        display: inline-block;
        width: 24%;
        margin: 0 0.5%;
    }

    .royal-related-grid {
        display: block;
    }

    .royal-related-item {
        display: inline-block;
        width: 48%;
        margin: 1%;
        vertical-align: top;
    }
}

/* Fallback for browsers that don't support grid */
@supports not (display: grid) {
    .royal-specs-list {
        display: block;
    }

    .royal-spec-item {
        margin-bottom: 10px;
    }

    .royal-related-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .royal-related-item {
        width: calc(33.333% - 15px);
        margin-bottom: 20px;
    }

    @media (max-width: 768px) {
        .royal-related-item {
            width: calc(50% - 10px);
        }
    }

    @media (max-width: 480px) {
        .royal-related-item {
            width: 100%;
        }
    }
}