/* ============================================
   PizzaLogic Pizza Tools Styles
   Integrates with existing theme system
   ============================================ */

/* --- Tools Header --- */

.tools-header {
    text-align: center;
    padding: 32px 20px 24px;
    background: var(--card-bg);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    margin-bottom: 20px;
    border-bottom: 3px solid var(--primary-color);
}

.tools-header h1 {
    color: var(--card-heading);
    font-size: 1.8em;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.tools-header .tools-subtitle {
    color: var(--step-text);
    font-size: 1em;
    margin: 0;
    line-height: 1.5;
}

/* --- FTC Disclosure --- */

.tools-disclosure {
    background: var(--tip-bg);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 20px;
    font-size: 0.82em;
    color: var(--label-color);
    line-height: 1.5;
}

/* --- Category Section --- */

.tools-category {
    margin-bottom: 28px;
}

.tools-category-title {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.3em;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

/* --- Product Grid (Listing) --- */

.tools-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 601px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Product Card (Listing) --- */

.tools-card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.tools-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 48px rgba(0, 0, 0, 0.3);
}

.tools-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background: #fff;
    padding: 16px;
}

.tools-card-content {
    padding: 14px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tools-card-title {
    font-size: 1em;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
    color: var(--card-heading);
}

.tools-card-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85em;
    margin-bottom: 8px;
    color: var(--step-text);
}

.tools-card-rating .stars {
    color: #f0a500;
    letter-spacing: 1px;
}

.tools-card-rating .review-count {
    color: var(--label-color);
    font-size: 0.9em;
}

.tools-card-price {
    font-size: 1.1em;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: auto;
}

.tools-card-cta {
    display: inline-block;
    font-size: 0.82em;
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 8px;
}

/* --- Product Detail Header --- */

.tools-detail-header {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--card-bg);
    border-radius: 0 0 12px 12px;
    padding: 14px 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-bottom: 3px solid var(--primary-color);
}

.tools-detail-header .header-logo {
    height: 40px;
    width: 40px;
}

.tools-detail-header-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tools-detail-header-title {
    color: var(--card-heading);
    font-size: 1.1em;
    font-weight: 700;
    text-decoration: none;
    transition: color 0.15s;
}

.tools-detail-header-title:hover {
    color: var(--primary-hover);
}

/* --- Breadcrumb --- */

.tools-breadcrumb-inline {
    font-size: 0.8em;
    color: var(--label-color);
}

.tools-breadcrumb-inline a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.15s;
}

.tools-breadcrumb-inline a:hover {
    opacity: 0.8;
}

/* --- Product Detail Page --- */

.tools-product-detail {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    margin-bottom: 20px;
}

.tools-product-main {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .tools-product-main {
        flex-direction: row;
    }
}

.tools-product-image-wrap {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

@media (min-width: 768px) {
    .tools-product-image-wrap {
        flex: 0 0 45%;
        max-width: 45%;
    }
}

.tools-product-image {
    max-width: 100%;
    max-height: 400px;
    object-fit: contain;
}

.tools-product-info {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tools-product-title {
    color: var(--card-heading);
    font-size: 1.5em;
    line-height: 1.25;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.tools-product-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
    margin-bottom: 16px;
    color: var(--step-text);
}

.tools-product-rating .stars {
    color: #f0a500;
    font-size: 1.15em;
    letter-spacing: 1px;
}

.tools-product-rating .rating-text {
    font-weight: 600;
}

.tools-product-rating .review-count {
    color: var(--label-color);
}

.tools-product-price {
    font-size: 1.6em;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.tools-product-description {
    color: var(--card-text);
    line-height: 1.7;
    font-size: 1em;
    margin-bottom: 24px;
    flex: 1;
}

.tools-product-description p {
    margin: 0 0 14px;
}

.tools-product-description p:last-child {
    margin-bottom: 0;
}

/* --- Buy Button --- */

.tools-buy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary-color);
    color: #fff;
    font-size: 1.1em;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: 10px;
    text-decoration: none;
    transition:
        background 0.2s ease,
        transform 0.15s ease;
    margin-top: auto;
}

.tools-buy-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.tools-buy-btn:active {
    transform: translateY(0);
}

/* --- Related Products --- */

.tools-related {
    padding: 24px;
    border-top: 2px solid var(--border-light);
}

.tools-related-title {
    color: var(--card-heading);
    font-size: 1.15em;
    font-weight: 700;
    margin-bottom: 14px;
}

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

@media (min-width: 768px) {
    .tools-related-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.tools-related-card {
    display: flex;
    flex-direction: column;
    background: var(--tip-bg);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease;
}

.tools-related-card:hover {
    transform: translateY(-2px);
}

.tools-related-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    background: #fff;
    padding: 8px;
}

.tools-related-card-info {
    padding: 8px 10px 10px;
}

.tools-related-card-title {
    font-size: 0.8em;
    font-weight: 600;
    color: var(--card-heading);
    line-height: 1.3;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tools-related-card-price {
    font-size: 0.85em;
    font-weight: 700;
    color: var(--primary-color);
}

/* --- Product Detail Footer --- */

.tools-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 2px solid var(--border-light);
    gap: 12px;
    flex-wrap: wrap;
}

.tools-footer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92em;
    transition: color 0.15s;
}

.tools-footer-link:hover {
    color: var(--primary-hover);
}

/* --- Mobile Responsive --- */

@media (max-width: 600px) {
    .tools-header {
        padding: 24px 16px 20px;
    }

    .tools-header h1 {
        font-size: 1.5em;
    }

    .tools-detail-header {
        padding: 12px 16px;
        gap: 10px;
    }

    .tools-detail-header .header-logo {
        height: 32px;
        width: 32px;
    }

    .tools-detail-header-title {
        font-size: 1em;
    }

    .tools-breadcrumb-inline {
        font-size: 0.75em;
    }

    .tools-product-info {
        padding: 20px 16px;
    }

    .tools-product-title {
        font-size: 1.3em;
    }

    .tools-product-image-wrap {
        padding: 16px;
    }

    .tools-buy-btn {
        width: 100%;
        text-align: center;
    }

    .tools-related {
        padding: 16px;
    }

    .tools-product-footer {
        padding: 14px 16px;
        flex-direction: column;
        align-items: flex-start;
    }

    .tools-category-title {
        font-size: 1.15em;
    }
}
