.ctp-container { max-width: 1200px; margin: 30px auto; padding: 0 15px; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; box-sizing: border-box; }

/* Category Tabs */
.ctp-tabs { display: flex; gap: 10px; margin-bottom: 25px; flex-wrap: wrap; justify-content: center; }
.ctp-tab-btn { padding: 8px 20px; background: #fff; border: 1px solid #ddd; border-radius: 20px; cursor: pointer; font-weight: bold; color: #555; }
.ctp-tab-btn.active, .ctp-tab-btn:hover { background: #d35400; color: #fff; border-color: #d35400; }

/* Grid */
.ctp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ctp-card { background: #ffffff; border-radius: 12px; overflow: hidden; border: 1px solid #f0f0f0; box-shadow: 0 4px 15px rgba(0,0,0,0.03); display: flex; flex-direction: column; }

.ctp-card-img-box { position: relative; height: 260px; overflow: hidden; cursor: pointer; background: #fdfdfd; }
.ctp-card-img-box img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; display: block; }
.ctp-card-img-box:hover img { transform: scale(1.04); }

.ctp-badge { position: absolute; top: 10px; left: 10px; background: #be2edd; color: #fff; font-size: 11px; padding: 4px 10px; border-radius: 12px; font-weight: bold; z-index: 2; }

.ctp-card-body { padding: 15px; text-align: left; display: flex; flex-direction: column; flex-grow: 1; }
.ctp-cat-name { color: #b76e28; font-size: 13px; font-weight: 600; display: block; margin-bottom: 4px; }
.ctp-title { font-size: 15px; font-weight: 700; color: #2c3e50; margin: 0 0 10px 0; cursor: pointer; line-height: 1.3; }

/* Pricing */
.ctp-price-box { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.ctp-regular-price { color: #aaa; text-decoration: line-through; font-size: 14px; }
.ctp-sale-price { color: #8e44ad; font-size: 20px; font-weight: 800; }

/* Full-width Action Buttons */
.ctp-actions-full { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: auto; }
.ctp-btn { border: none; border-radius: 8px; font-weight: bold; cursor: pointer; text-align: center; transition: background 0.3s ease; }

.ctp-btn-cart-full { background: #3498db; color: #fff; padding: 10px; width: 100%; font-size: 14px; }
.ctp-btn-cart-full:hover { background: #2980b9; }

.ctp-btn-order-full { background: #d35400; color: #fff; padding: 11px; width: 100%; font-size: 15px; }
.ctp-btn-order-full:hover { background: #b94600; }

/* POPUP STYLES */
.ctp-modal { display: none; position: fixed; z-index: 999999; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.75); align-items: center; justify-content: center; }
.ctp-modal-content { background: #fff; width: 90%; max-width: 850px; border-radius: 12px; padding: 25px; position: relative; max-height: 90vh; overflow-y: auto; box-sizing: border-box; }
.ctp-close { position: absolute; right: 15px; top: 10px; font-size: 28px; font-weight: bold; cursor: pointer; color: #333; z-index: 10; line-height: 1; }

.ctp-modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; text-align: left; width: 100%; box-sizing: border-box; align-items: start; }
.ctp-modal-gallery { width: 100%; min-width: 0; overflow: hidden; }

/* Swiper Fix */
.ctp-popup-swiper { width: 100%; height: 320px; border-radius: 8px; overflow: hidden; position: relative; background: #f9f9f9; }
.ctp-popup-swiper .swiper-wrapper { width: 100%; height: 100%; }
.ctp-popup-swiper .swiper-slide { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }

.ctp-zoom-box { width: 100%; height: 100%; overflow: hidden; position: relative; cursor: zoom-in; }
.ctp-zoom-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.ctp-zoom-box:hover .ctp-zoom-img { transform: scale(1.5); }

/* Thumbnails */
.ctp-thumb-container { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; padding-bottom: 5px; }
.ctp-thumb-img { width: 55px; height: 55px; object-fit: cover; border-radius: 6px; cursor: pointer; border: 2px solid transparent; flex-shrink: 0; }
.ctp-thumb-img.active { border-color: #d35400; }

/* Right Column Info */
.ctp-modal-info { width: 100%; min-width: 0; }
.ctp-modal-title { font-size: 20px; color: #2c3e50; margin: 4px 0 10px 0; font-weight: 700; line-height: 1.3; }
.modal-price-box { border-bottom: 1px solid #f0f0f0; padding-bottom: 10px; }

/* Description Styling */
.ctp-main-desc { font-size: 14px; color: #444; line-height: 1.6; margin: 12px 0; }
.ctp-main-desc p { margin-bottom: 8px; }

.ctp-feature-list { list-style: none; padding: 0; margin: 12px 0; color: #555; font-size: 14px; }
.ctp-feature-list li { margin-bottom: 6px; }

/* Delivery Box */
.ctp-delivery-box { background: #fffdf5; border: 1px solid #f7ebc2; border-radius: 8px; padding: 12px; margin-bottom: 15px; font-size: 13px; color: #444; }
.ctp-del-row { display: flex; justify-content: space-between; margin-bottom: 6px; }
.ctp-del-cod { border-top: 1px dashed #e8d9a7; padding-top: 6px; margin-top: 6px; }

/* Floating Cart & Cart Modal */
#ctp-floating-cart { position: fixed; bottom: 20px; right: 20px; background: #d35400; color: #fff; padding: 10px 18px; border-radius: 25px; font-weight: bold; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.2); z-index: 9999; display: none; }
.ctp-cart-item { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #eee; padding: 8px 0; }
.ctp-cart-item img { width: 45px; height: 45px; object-fit: cover; border-radius: 4px; }

.ctp-checkout-content { max-width: 450px; }
.ctp-form-group { margin-bottom: 12px; text-align: left; }
.ctp-form-group label { display: block; font-weight: bold; margin-bottom: 4px; font-size: 13px; }
.ctp-form-group input, .ctp-form-group textarea, .ctp-form-group select { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 6px; box-sizing: border-box; }
.ctp-order-summary { background: #f9f9f9; padding: 10px; border-radius: 6px; margin: 12px 0; font-size: 14px; }

@media (max-width: 768px) {
    .ctp-grid { grid-template-columns: 1fr; }
    .ctp-modal-grid { grid-template-columns: 1fr; }
    .ctp-popup-swiper { height: 250px; }
}

/* Sticky Actions & Scrollable Details */
.ctp-sticky-actions {
    margin-bottom: 15px;
    position: relative;
    z-index: 5;
}

/* Scrollable Container for Long Description & Features */
.ctp-details-scrollable {
    max-height: 180px;
    overflow-y: auto;
    padding-right: 5px;
    border-top: 1px solid #f0f0f0;
    margin-top: 10px;
    padding-top: 10px;
}

/* Scrollbar Styling for details */
.ctp-details-scrollable::-webkit-scrollbar {
    width: 4px;
}
.ctp-details-scrollable::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}